#!usr/local/bin/lua
GUID="11112222333344445555666677778888"
gt = { }
min_last_write_time = 604800 --超过7天的才清理，时间是秒
--min_last_write_time = 0
function PathFileExists(path,redirect)
	iRet, bExist = osApi.PathFileExistsEx(path,redirect)
	if iRet == 0 and bExist == true then
		return 1
	end
	return 0
end
function PathDirExists(path,redirect)
	iRet, bExist = osApi.PathIsDirectory(path,redirect)
	if iRet == 0 and bExist == true then
		return 1
	end
	return 0
end
function GetRegValue(reg_path,reg_key)
	--osApi.Print("GarbageCleaner.txt", false, "GetRegValue:" .. reg_path .. " -- " .. reg_key)
	if osApi.ExistKey(reg_path, false) == false then
		--osApi.Print("GarbageCleaner.txt", false, "Not Exist Key")
		return ""
	end
	iRet, bExist = osApi.ExistValue(reg_path, reg_key, false);
	if iRet == 0 and bExist == true then
		iRet, strValue, vType = osApi.GetValue(reg_path, reg_key, false);
		--osApi.Print("GarbageCleaner.txt", false, "Value:" .. strValue)
		return strValue
	end
	--osApi.Print("GarbageCleaner.txt", false, "Not Exist Value")
	return ""
end

function EnumReDirectory(id,prefix,re_path,suffix)
	iRet,tlbFileScan = osApi.EnumDirectories(prefix,re_path,0,false) -- 枚举目录下的符合正则表达式的子目录
	for nIndex = 1, #tlbFileScan do
		value = tlbFileScan[nIndex]
		path = value .. suffix
		if PathDirExists(path,false) or PathFileExists(path,false) then
			GarbageCleanApi.AddScanPath(GUID..'_'..id,path)
		end
	end
end
function AddScanPath(id,path)
	if path == nil or path == '' then
		return 0
	end
	--osApi.Print("GarbageCleaner.txt", false, "AddScanPath : " .. path)
	GarbageCleanApi.AddScanPath(GUID..'_'..id,path)
end
function AddAllDriversWithSuffix(id,suffix_path)
	iRet, tlbDrivers = osApi.EnumDrivers(false);
	if iRet == 0 then
		for nIndex = 1, #tlbDrivers do
			value = tlbDrivers[nIndex] .. suffix_path
			AddScanPath(id,value)
		end
	end
end
function ScanAllDriversWithSuffix(id,suffix_path)
	iRet, tlbDrivers = osApi.EnumDrivers(false);
	if iRet == 0 then
		for nIndex = 1, #tlbDrivers do
			value = tlbDrivers[nIndex] .. suffix_path
			ScanPath(id,value)
		end
	end
end
function GetAllDrivers(id)
	AddAllDriversWithSuffix(id,'')
end

function GetParentPath(path,level)
	if level == 0 then
		return path
	end
	for nIndex=string.len(path),1,-1 do
		subpath = string.sub(path,nIndex,nIndex)
		--osApi.Print("GarbageCleaner.txt", false, "GetParentPath " .. nIndex .. ' ' .. subpath)
		if subpath == '\\' then
			--osApi.Print("GarbageCleaner.txt", false, "F GetParentPath " .. nIndex)
			level = level - 1
			if level == 0 then
				return string.sub(path,1,nIndex)
			end
		end
	end
	--osApi.Print("GarbageCleaner.txt", false, "Not Found : \\ ")
	return ''
end
function GetFileVersion(path,trim_right_count)
	--iRet,version = osApi.QueryFileVerInfo(path,'FileVersion',false)
	iRet,version = osApi.QueryFileVerInfo(path,'ProductVersion',false)
	if iRet~=0 then
		return ''
	end
	version = string.gsub(version,' ','')
	version = string.gsub(version,',','.')
	osApi.Print("GarbageCleaner.txt", false, "version :" ..  version)
	if trim_right_count == 0 then
		return version
	end
	for nIndex=string.len(version),1,-1 do
		subpath = string.sub(version,nIndex,nIndex)
		if subpath == '.' then
			trim_right_count = trim_right_count - 1
			if trim_right_count == 0 then
				if nIndex > 1 then
					return string.sub(version,1,nIndex-1)
				end
				return ''
			end
		end
	end
	return ''
end
function IsCurruntVersion(path,version)
	local len_path = string.len(path)
	local len_ver = string.len(version)
	if len_path<len_ver then
		return false
	end
	iBeg,iend = string.find(path,version,len_path-len_ver+1)
	if iBeg == nil then
		return false
	end
	return true
end
function GetFileName(path)
	--osApi.Print("GarbageCleaner.txt", false, "GetFileName :" .. path)
	local iBeg = 0
	local iBeg = string.find(path,"\\",iBeg + 1)
	local iPreBeg = 0
	while iBeg ~= nil do
		iPreBeg = iBeg
		iBeg = string.find(path,"\\",iBeg + 1)
	end
	strFileName = string.sub(path,iPreBeg + 1)
	--osApi.Print("GarbageCleaner.txt", false, "Str :" .. strFileName .. '-' .. path)
	return strFileName
end
function GetVersionArray(path)
	local cur_str = ''
	local version_array = {}
	local arr_index = 1
	local version = GetFileName(path)
	for nIndex=1,string.len(version),1 do
		cur = string.sub(version,nIndex,nIndex)
		if cur>='0' and cur<='9' then
			cur_str = cur_str .. cur
		end
		if cur == '.' and cur_str~= '' then
			--osApi.Print("GarbageCleaner.txt", false, "Str :" .. cur_str)
			version_array[arr_index] = cur_str
			cur_str = ''
			arr_index = arr_index + 1
		end
	end
	if cur_str~= '' then
		--osApi.Print("GarbageCleaner.txt", false, "Str :" .. cur_str)
		version_array[arr_index] = cur_str
	end
	return version_array
end
function IsBiggerVersion(a,b)
	a_arr = GetVersionArray(a)
	b_arr = GetVersionArray(b)
	len_a = #a_arr
	len_b = #b_arr
	osApi.Print("GarbageCleaner.txt", false, "len_a :" .. len_a)
	osApi.Print("GarbageCleaner.txt", false, "len_b :" .. len_b)
	min_len = len_a
	if min_len > len_b then
		min_len = len_b
	end
	for nIndex = 1, min_len do
		v_a = a_arr[nIndex]
		number_a = tonumber(v_a)
		v_b = b_arr[nIndex]
		number_b = tonumber(v_b)
		osApi.Print("GarbageCleaner.txt", false, "a :" .. number_a)
		osApi.Print("GarbageCleaner.txt", false, "b :" .. number_b)
		if number_a > number_b then
			--osApi.Print("GarbageCleaner.txt", false, "return true 1")
			return true
		end
		if number_a < number_b then
			--osApi.Print("GarbageCleaner.txt", false, "return false 1")
			return false
		end
	end
	if len_a > len_b then
		--osApi.Print("GarbageCleaner.txt", false, "return true 2")
		return true
	end
	--osApi.Print("GarbageCleaner.txt", false, "return false 2")
	return false
end

--[[function GetMultiVersionDir(id,reg_path,reg_key,re_version,ver_path_parent_dir_level,append_path,parent_dir_level,version_trim_right)
	local dir = GetRegValue(reg_path,reg_key) -- 安装目录 或 文件
	
	if dir ~= nil and dir ~= '' then
		dir = string.gsub(dir,'"','')
		path = GetParentPath(dir,ver_path_parent_dir_level)
		path = path .. append_path -- 拼接exe文件
		Filever = GetFileVersion(path,version_trim_right) -- 获取文件版本
		if Filever == '' then
			return 0
		end
		dir = GetParentPath(dir,parent_dir_level) -- 获取父目录(如果dir是文件路径,需要截断文件名用)
		iRet,tlbFileScan = osApi.EnumDirectories(dir,re_version,0,false) -- 枚举目录下的符合正则表达式的子目录
		local found = 0
		local currunt_version = ''
		for nIndex = 1, #tlbFileScan do
			value = tlbFileScan[nIndex]
			if IsCurruntVersion(value,Filever) == true then	-- 判断是否当前版本目录
				found = 1
				currunt_version = value
				break
			end
		end
		--osApi.Print("GarbageCleaner.txt", false, "Version 1 : " .. currunt_version)
		if found == 0 then
			for nIndex = 1, #tlbFileScan do
				value = tlbFileScan[nIndex]
				if currunt_version == '' or IsBiggerVersion(value,currunt_version) == true then	-- 判断是否当前版本目录
					currunt_version = value
					found = 1
				end
			end
		end
		--osApi.Print("GarbageCleaner.txt", false, "Version 2 : " .. currunt_version)
		if found == 1 then
			for nIndex = 1, #tlbFileScan do
				value = tlbFileScan[nIndex]
				if currunt_version ~= value then	-- 判断是否当前版本目录，如果不是则属于扫描范围
				GarbageCleanApi.AddScanPath(GUID..'_'..id,value)
				end
			end
		end
	end
end]]

function GetMultiVersionDir(id,reg_path,reg_key,re_version,ver_path_parent_dir_level,append_path,parent_dir_level,version_trim_right)
	local dir = GetRegValue(reg_path,reg_key) -- 安装目录 或 文件
	--osApi.Print("GarbageCleaner.txt", false, "开始")
	if dir ~= nil and dir ~= '' then
		dir = string.gsub(dir,'"','')
		path = GetParentPath(dir,ver_path_parent_dir_level)
		path = path .. append_path -- 拼接exe文件
		Filever = GetFileVersion(path,version_trim_right) -- 获取文件版本
		if Filever == '' then
			return 0
		end
		dir = GetParentPath(dir,parent_dir_level) -- 获取父目录(如果dir是文件路径,需要截断文件名用)
		iRet,tlbFileScan = osApi.EnumDirectories(dir,re_version,0,false) -- 枚举目录下的符合正则表达式的子目录
		local found = 0
		local currunt_version = ''
		for nIndex = 1, #tlbFileScan do
			value = tlbFileScan[nIndex]
			if IsCurruntVersion(value,Filever) == true then	-- 判断是否当前版本目录
				found = 1
				currunt_version = value
				break
			end
		end
		
		if found == 0 then
			--osApi.Print("GarbageCleaner.txt", false, "Did not get curren_version")
			return 0
		end
		--osApi.Print("GarbageCleaner.txt", false, "Version 1 : " .. currunt_version)
		tlbFileScan_List = {}
		if found == 1 then
			for nIndex = 1, #tlbFileScan do
				value = tlbFileScan[nIndex]
				--osApi.Print("GarbageCleaner.txt", false, "versiontesting"..tlbFileScan[nIndex])
				if IsBiggerVersion(value,currunt_version) == false then	-- 判断是否当前版本目录
				
					table.insert(tlbFileScan_List,value)
					--osApi.Print("GarbageCleaner.txt", false, "version bingo"..value)
					--found = 1
				end
			end
		end
		--osApi.Print("GarbageCleaner.txt", false, "Version 2 : " .. currunt_version)
		if found == 1 then
			for nIndex = 1, #tlbFileScan_List do
				value = tlbFileScan_List[nIndex]
				--osApi.Print("GarbageCleaner.txt", false, "version"..tlbFileScan_List[nIndex])
				if currunt_version ~= value then	-- 判断是否当前版本目录，如果不是则属于扫描范围
				--osApi.Print("GarbageCleaner.txt", false, "bingo")
				GarbageCleanApi.AddScanPath(GUID..'_'..id,value)
				end
			end
		end
	end
end

function ScanPath(id,path)
	iRet,nNowTime = osApi.GetNowFileTime()
	iRet,tblFile = osApi.EnumFiles(path,"",20,false)
	nNowTime = nNowTime/10000000
	--osApi.Print("GarbageCleaner.txt", false, "NowTime:"..nNowTime .." ScanPath:"..path .. " " .. iRet)
	if string.find(id,"PreScan_") == 1 then
		GarbageCleanApi.AddScanPath(GUID..'_'..id,path)
		return
	end
	local tblResult = {}
	local iResult = 1
	if iRet == 0 then
		for nIndex = 1,#tblFile do
			valuefile = tblFile[nIndex]
			--osApi.Print("GarbageCleaner.txt", false, valuefile);
			iBeg = 0
			iBeg = string.find(valuefile,"\\",iBeg + 1)
			while iBeg ~= nil do
				iPreBeg = iBeg
				iBeg = string.find(valuefile,"\\",iBeg + 1)
			end
			strFilePath = string.sub(valuefile,0,iPreBeg)
			strFileName = string.sub(valuefile,iPreBeg + 1)
			
			--osApi.Print("GarbageCleaner.txt", false, strFilePath);
			--osApi.Print("GarbageCleaner.txt", false, strFileName);
			iRet, nLastWriteTime = osApi.GetFileLastWriteTime(valuefile,false)
			nLastWriteTime = nLastWriteTime/10000000
			osApi.Print("GarbageCleaner.txt", false, "time interval:".. nNowTime-nLastWriteTime .. " " .. strFileName);
			if nLastWriteTime > nNowTime or nNowTime-nLastWriteTime<min_last_write_time then
				return
			end
			
			--osApi.Print("GarbageCleaner.txt", false, "nLastWriteTime"..nLastWriteTime .." Path:"..valuefile)
			iRet, nFileSize = osApi.GetFileSize(valuefile, false);
			local tmpItem = {}
			tmpItem['FilePath'] = strFilePath
			tmpItem['FileName'] = strFileName
			tmpItem['FileSize'] = nFileSize
			tblResult[iResult] = tmpItem
			iResult = iResult + 1
		end
		for nIndex = 1,#tblResult do
			valuefile = tblResult[nIndex]
			--osApi.Print("GarbageCleaner.txt", false, "Result:"..valuefile['FilePath'] .. '-' .. valuefile['FileName'])
			GarbageCleanApi.AddScanFileResult(GUID..'_'..id, valuefile['FilePath'], valuefile['FileName'],valuefile['FileSize'], "", false);
		end
		--osApi.Print("GarbageCleaner.txt", false, "EnumDir : " .. path)
		iRet,tlbFileScan = osApi.EnumDirectories(path,'',20,false) -- 枚举目录下的符合正则表达式的子目录
		for nIndex = 1, #tlbFileScan do
			value = tlbFileScan[nIndex]
			--osApi.Print("GarbageCleaner.txt", false, "Dir : " .. value)
			GarbageCleanApi.AddScanFileResult(GUID..'_'..id, value, '',0, "", false);
		end
		iRet, vData = osApi.ExpandEnvironmentStrings(path, false);
		if iRet == 0 then
			if PathDirExists(vData,false) then
				GarbageCleanApi.AddScanFileResult(GUID..'_'..id, vData, '',0, "", false);
			end
		end
	end
end

function CheckAppExist(app_name,scan_list,all_drivers_list)
	bExist = false
	for nIndex = 1, #scan_list do
		iRet,tmpscan_list = osApi.ExpandEnvironmentStrings(scan_list[nIndex],false)
		--osApi.Print("GarbageCleaner.txt", false, "tmpscan_list iRet = "  .. iRet)
		if iRet == 0 then
			iRet,tblFile_list = osApi.EnumFiles(tmpscan_list,"",3,false)
			--osApi.Print("GarbageCleaner.txt", false, "tblFolder = " .. iRet .. " path = " .. tmpscan_list)
		end
		if iRet == 0	then
			for nIndex = 1,#tblFile_list do
				valuefile = tblFile_list[nIndex]
				iBeg = 0
				iBeg = string.find(valuefile,"\\",iBeg + 1)
				while iBeg ~= nil do
					iPreBeg = iBeg
					iBeg = string.find(valuefile,"\\",iBeg + 1)
				end
				strFileName = string.sub(valuefile,iPreBeg + 1)
				osApi.Print("GarbageCleaner.txt", false, "file name = " .. strFileName)
				if strFileName == app_name then
					bExist = true		
					--osApi.Print("GarbageCleaner.txt", false, "founded " .. iRet .. " path = " .. strFileName)					
				end
			end
		end
	end
		
	iRet, tlbDrivers = osApi.EnumDrivers(false);
	osApi.Print("GarbageCleaner.txt", false, "table iRet = " .. iRet)
	if iRet == 0 then
		for ntbIndex = 1, #tlbDrivers do
			for nDriveIndex = 1, #all_drivers_list do
				suffix_path = all_drivers_list[nDriveIndex]
				path = tlbDrivers[ntbIndex] .. suffix_path
				iRet,tblFile = osApi.EnumFiles(path,"",20,false)
				osApi.Print("GarbageCleaner.txt", false, "iRet = " .. iRet .. " path = " .. path)
				if iRet == 0 then
					for nIndex = 1,#tblFile do
						valuefile = tblFile[nIndex]
						iBeg = 0
						iBeg = string.find(valuefile,"\\",iBeg + 1)
						while iBeg ~= nil do
							iPreBeg = iBeg
							iBeg = string.find(valuefile,"\\",iBeg + 1)
						end
						strFileName = string.sub(valuefile,iPreBeg + 1)
						osApi.Print("GarbageCleaner.txt", false, "file name = " .. strFileName)
						if strFileName == app_name then
							bExist = true
						end
					end
				end
			end
		end
	end
	
	return bExist
end

function CheckAndScan(id,reg_list,scan_list,all_drivers_list)
	for nIndex = 1, #reg_list do
		p = reg_list[nIndex].p
		k = reg_list[nIndex].k
		--osApi.Print("GarbageCleaner.txt", false, "Enum Reg:" .. p .. "-" .. k)
		path = GetRegValue(p,k)
		osApi.Print("GarbageCleaner.txt", false, "Enum Reg Path : "..id)
		osApi.Print("GarbageCleaner.txt", false,path )
		tmpPath = path
		path = string.gsub(path,'"','')
				
		if path ~= nil and path ~= '' and PathFileExists(path,false) ~= 0 then
			--osApi.Print("GarbageCleaner.txt", false, "Enum Reg:Return")
			return 0
		else
			path = g_ExpandPath(tmpPath)
			osApi.Print("GarbageCleaner.txt", false, "Enum Reg Path1 : "..id)
			osApi.Print("GarbageCleaner.txt", false,path )
			if path ~= nil and path ~= '' and PathFileExists(path,false) ~= 0 then
				return 0
			end
		end
	end
	for nIndex = 1, #scan_list do
		--osApi.Print("GarbageCleaner.txt", false, "Enum Path:" .. scan_list[nIndex])
		ScanPath(id,scan_list[nIndex])
	end
	for nIndex = 1, #all_drivers_list do
		--osApi.Print("GarbageCleaner.txt", false, "Enum Path:" .. all_drivers_list[nIndex])
		ScanAllDriversWithSuffix(id,all_drivers_list[nIndex])
	end
end
--ExpandPath函数参数解析，对常见带空格路径做规避处理
function g_ExpandPath(tmpPath)
	local  spaceStr = {
		"Documents and Settings",
		"Program Files %(x86%)", --"Program Files %(x86%)"，Program Files 顺序不能乱
		"Program Files",
		"Application Data",
	}
	local tmpSpaceStr = ""
	local tmpNoSpaceStr = ""
	local tmpNoSpacePath = tmpPath
	local tmpStr = ""
	
	for i = 1, #spaceStr do
		local tmpP = spaceStr[i]
		local iRet = string.find(string.lower(tmpPath),string.lower(spaceStr[i]))
		if iRet ~= nil then			
			tmpSpaceStr = spaceStr[i]
			tmpNoSpaceStr = string.gsub(spaceStr[i], "%s+", "")
			tmpNoSpacePath = string.gsub(string.lower(tmpPath), string.lower(tmpSpaceStr), string.lower(tmpNoSpaceStr))
			break
		end
	end
	local iRet, PathTable = osApi.ExpandPath(tmpNoSpacePath,false)
	if iRet == 0 and #PathTable ~= 0 then
		tmpStr = PathTable[1]
	else
		tmpStr = tmpPath
	end
	local tmpResult = string.gsub(tmpStr, string.lower(tmpNoSpaceStr), string.lower(tmpSpaceStr))
	return tmpResult
end
function CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
	for nIndex = 1, #reg_list do
		p = reg_list[nIndex].p
		k = reg_list[nIndex].k
		--osApi.Print("GarbageCleaner.txt", false, "Enum Reg:" .. p .. "-" .. k)
		path = GetRegValue(p,k)
		--osApi.Print("GarbageCleaner.txt", false, "Enum Reg Path : " .. path)		
		osApi.Print("GarbageCleaner.txt", false, "Enum Reg Path : "..id)
		osApi.Print("GarbageCleaner.txt", false,path )
		tmpPath = path
		path = string.gsub(path,'"','')
		if path ~= nil and path ~= '' and PathFileExists(path,false) ~= 0 then
			--osApi.Print("GarbageCleaner.txt", false, "Enum Reg:Return")
			return 0
		else
			path = g_ExpandPath(tmpPath)
			osApi.Print("GarbageCleaner.txt", false, "Enum Reg Path1 : "..id)
			osApi.Print("GarbageCleaner.txt", false,path )
			if path ~= nil and path ~= '' and PathFileExists(path,false) ~= 0 then
				return 0
			end
		end
	end
	--检测软件进程文件是否存在
	if CheckAppExist(app_name,scan_list,all_drivers_list) == true then
		osApi.Print("GarbageCleaner.txt", false, "app " .. app_name .. " exits~~~")
		return
	end
	for nIndex = 1, #scan_list do
		--osApi.Print("GarbageCleaner.txt", false, "Enum Path:" .. scan_list[nIndex])
		ScanPath(id,scan_list[nIndex])
	end
	for nIndex = 1, #all_drivers_list do
		--osApi.Print("GarbageCleaner.txt", false, "Enum Path:" .. all_drivers_list[nIndex])
		ScanAllDriversWithSuffix(id,all_drivers_list[nIndex])
	end
end
function CheckAppNoRegScan(id,app_name,scan_list)
	--检测软件进程文件是否存在
	local scanpath 
	for i = 1, #scan_list do
		iRet, scanpath = osApi.ExpandEnvironmentStrings(scan_list[i], true)
		if iRet == 0 and scanpath ~=nil then			
			osApi.Print("GarbageCleaner.txt", false,"360folder:".. scanpath)	
			for mIndex = 1, #app_name do	
				tmppath = scanpath.. "\\".. app_name[mIndex]
				osApi.Print("GarbageCleaner.txt", false, "check: "..tmppath)

				iRet, appExists = osApi.PathFileExistsEx(tmppath, false)		
				
				if iRet == 0 and appExists == true then
					osApi.Print("GarbageCleaner.txt", false, tmppath .. " exits~~~")		
					return 					
				end				
			end				
		end
	end				
	
	for nIndex = 1, #scan_list do
		--osApi.Print("GarbageCleaner.txt", false, "Enum Path:" .. scan_list[nIndex])
		ScanPath(id,scan_list[nIndex])
	end
end

-------------------------------游戏补丁包检测------------------------------------
--获取游戏路径
function GetGamePath(reg_path, reg_key, bSpecial)
	local strValue,strVPath,tgppath
	if osApi.ExistKey(reg_path, false) == false then
		return ""
	end
	iRet, bExist = osApi.ExistValue(reg_path, reg_key, false);
	if iRet == 0 and bExist == true then
		iRet, strValue, vType = osApi.GetValue(reg_path, reg_key, false);
		tgppath = strValue
		strVPath = strValue .. '\\TCLS'
		if bSpecial ~= true then
			strValue =  strValue .. '\\TCLS'
		end
		return strValue,strVPath,tgppath
	end
	return ""
end

--获取游戏当前版本值
function GetGameVersion(path)
	local mmog_data_path = path .. '\\mmog_data.xml'
	local section = 'ClientConf\\VersionData\\Version\\'
	local _,result = osApi.GetXMLData(mmog_data_path,section,false)
	return result
end

--获取补丁包列表
function GetGamePatchs(path)
	local patchs_path = path .. '\\patchs'
	iRet,patchs = osApi.EnumFiles(patchs_path, '', 0, false)
	return patchs
end
--获取TGP补丁包列表
function GetTGPPatchs(path)
	local patchs_path = path .. '\\tgppatches'
	iRet,patchs = osApi.EnumFiles(patchs_path, '', 1, false)
	return patchs
end

--比较获取最终可删除补丁包列表
function GetCanDelPatchs(id,lst_patchs,version,re_begin,re_end,rp_begin,bVerSpec)
	local result_array = {}
	local iResult = 1
	for index = 1 , #lst_patchs do
		while true do	-- 因为要中途跳出当前循环
			valuefile = lst_patchs[index]
			iBeg = 0
			iBeg = string.find(valuefile,"\\",iBeg + 1)
			while iBeg ~= nil do
				iPreBeg = iBeg
				iBeg = string.find(valuefile,"\\",iBeg + 1)
			end
			strFilePath = string.sub(valuefile,0,iPreBeg)
			strFileName = string.sub(valuefile,iPreBeg + 1)
			--判断版本值是否符合
			iRet, patch_version = osApi.GetPatchVersion(strFileName,re_begin,re_end,rp_begin)
			
			--判断版本是否规范 
			if bVerSpec == true then --此处只针对LOL特殊补丁包版本
				version = string.gsub(version,'[.]','')
				patch_version = string.gsub(patch_version,'[.]','')
				if tonumber(version) == nil or tonumber(patch_version) == nil then
					break
				end
				if string.len(version) > string.len(patch_version) then
					patch_version = patch_version .. '0'
				end
				if tonumber(version) < tonumber(patch_version) then
					 break
				end
			else
				nVersion = string.gsub(version,'[.]','')
				nPVersion = string.gsub(patch_version,'[.]','')
				if tonumber(nVersion) == nil or tonumber(nPVersion) == nil then
					break
				end
				_,bVersionOK = osApi.VersionCompare(version,patch_version) 		--版本比较函数
				if bVersionOK ~= true then
					break
				end
			end
			
			iRet, nFileSize = osApi.GetFileSize(valuefile, false);
			local tmpItem = {}
			tmpItem['FilePath'] = strFilePath
			tmpItem['FileName'] = strFileName
			tmpItem['FileSize'] = nFileSize
			result_array[iResult] = tmpItem
			iResult = iResult + 1
			osApi.Print("GarbageCleaner.txt", false, 'Version = ' .. version .. ' patch_version = ' .. patch_version .. ' , File = ' .. strFileName)
			break
		end
	end

	for index = 1,#result_array do
		valuefile = result_array[index]
		GarbageCleanApi.AddScanFileResult(GUID..'_'..id, valuefile['FilePath'], valuefile['FileName'],valuefile['FileSize'], "", true);
	end
	return result_array
end

--检测游戏补丁包是否满足垃圾条件
--1.id:函数id
--2.gameID:游戏id
--3.reg_path:注册表安装包路径
--4.reg_key:注册表键值
--5.bSpecial:是否为特殊TCLS
--6.re_begin:前识别子串
--7.reg_end:后识别子串
--8.rp_begin:前识别子串第几次出现（为了区分较难识别的文件名）
function CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,bVerSpec)
	osApi.Print("GarbageCleaner.txt", false, "GameID = " .. gameID)
	--1.判断游戏是否在运行
	iRet,bRunning = osApi.IsGameRunning(gameID)
	osApi.Print("GarbageCleaner.txt", false, id .. ' ' .. 'iRet = ' .. iRet .. ' bRunning = ' .. bRunning)
	if bRunning == 1 then	--如果游戏当前正在运行，则不扫描更新包
		osApi.Print("GarbageCleaner.txt", false, id .. " IsGameRunning fail")
		return 
	end
	--2.获取配置文件mmog_data.xml中的版本值
	local path,vpath,tgppath = GetGamePath(reg_path, reg_key, bSpecial)
	if path == nil then		--如果路径没有，则终止
		osApi.Print("GarbageCleaner.txt", false, id .. " GetGamePath fail")
		return 
	end
	local version = GetGameVersion(vpath)
	if version == nil then		--如果没有拿到当前版本，则终止
		osApi.Print("GarbageCleaner.txt", false, id .. " GetGameVersion fail")
		return
	end
	if string.find(id,"PreScan_") == 1 then
		GarbageCleanApi.AddScanPath(GUID..'_'..id,path)	--文件清理预扫描
		return
	end
	--3.获取补丁包列表
	local lst_patchs = GetGamePatchs(path)
	if lst_patchs == nil then	--如果补丁目录下没有文件，则跳过
		osApi.Print("GarbageCleaner.txt", false, id .." GetGamePatchs fail")
		return
	end
	--4.遍历补丁包比较版本值，得到可删除列表
	local lst_delPatchs = GetCanDelPatchs(id,lst_patchs,version,re_begin,re_end,rp_begin,bVerSpec)
	--5.获取TGP补丁包列表
	local lst_tgppatchs = GetTGPPatchs(tgppath)
	if lst_tgppatchs == nil then	--如果补丁目录下没有文件，则跳过
		osApi.Print("GarbageCleaner.txt", false, id .." GetTGPPatchs fail")
		return
	end	
	--6.遍历TGP补丁包比较版本值，得到可删除列表
	local lst_delPatchs = GetCanDelPatchs(id,lst_tgppatchs,version,re_begin,re_end,rp_begin,bVerSpec)
end
-------------------------------------------------------------------------------------------------

--CAD迷你画图卸载后残留
function f33991(id)
	local app_name = "DWGView.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\CAD迷你画图",k="UninstallString"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\DWGDraw.exe",k=""}
			
	local scan_list = {}
		
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\CAD迷你画图"
	all_drivers_list[2] = "Program Files\\CAD迷你画图"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--CAD迷你看图卸载后残留
function f33989(id)
	local app_name = "DWGView.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\CAD迷你看图",k="UninstallString"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\DWGView.exe",k=""}
			
	local scan_list = {}
		
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\CAD迷你看图"
	all_drivers_list[2] = "Program Files\\CAD迷你看图"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--虎牙直播卸载后残留
function f33987(id)
	local app_name = "huya.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\CurrentVersion\\Uninstall\\HuyaClient",k="UninstallString"}
			
	local scan_list = {}
	scan_list[1] = "%appdata%\\huyapc"
	scan_list[2] = "%localappdata%\\广州虎牙信息科技有限公司"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\HuyaLive\\HuyaClient"
	all_drivers_list[2] = "Program Files\\HuyaLive\\HuyaClient"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--快压卸载后残留
function f33967(id)
	local app_name = "kuaizip.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\KuaiZip",k="UninstallString"}
			
	local scan_list = {}
	scan_list[1] = "%appdata%\\KuaiZip"
	
	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--搜狗游戏大厅卸载后残留
function f33922(id)
	local app_name = "SogouGame.exe"
	local reg_list = {}
	reg_list[1] = {p="HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\SogouGame",k="UninstallString"}
			
	local scan_list = {}
	scan_list[1] = "%appdata%\\SogouGame"
	scan_list[2] = "%userprofile%\\AppData\\Local\\SogouGame"

	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--夜神安卓模拟器卸载后残留
function f33854(id)
	local app_name = "Nox.exe"
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Nox",k="UninstallString"}
			
	local scan_list = {}
	scan_list[1] = "%userprofile%\\.BigNox"
	scan_list[2] = "%userprofile%\\AppData\\Local\\Nox"
	scan_list[3] = "%userprofile%\\Nox_share"
	scan_list[4] = "%userprofile%\\vmlogs"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\Nox\\bin"
	all_drivers_list[2] = "Program Files\\Nox\\bin"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end


--万能五笔载后残留
function f33849(id)
	local app_name = "WnConfig.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\万能五笔内置版",k="UninstallString"}
			
	local scan_list = {}
	scan_list[1] = "%userprofile%\\AppData\\LocalLow\\WanNengWBIME"
	scan_list[2] = "%userprofile%\\AppData\\LocalLow\\WanNengWBIME.users"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\WanNengWBInput"
	all_drivers_list[2] = "Program Files\\WanNengWBInput"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end


--全民游戏盒子卸载后残留
function f33847(id)
	local app_name = "QQGameWorld.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\QQGameWorld",k="UninstallString"}
			
	local scan_list = {}
	scan_list[1] = "%appdata%\\tencent\\qqmgbdownload"
	scan_list[2] = "%appdata%\\tencent\\qqgameworld"
	
	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end


--逗游游戏盒卸载后残留
function f33845(id)
	local app_name = "doyo.exe"
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\逗游游戏宝库",k="InstallLocation"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\逗游游戏盒",k="InstallLocation"}	
		
	local scan_list = {}
	scan_list[1] = "%localappdata%\\Doyo"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "DoyoGames\\Flash"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--UC浏览器卸载后残留
function f33831(id)
	local app_name = "UCBrowser.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\UCBrowser",k="UninstallString"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\UC浏览器",k="UninstallString"}	

	local scan_list = {}
	scan_list[1] = "%userprofile%\\AppData\\Local\\UCBrowser\\User Data"
	
	local all_drivers_list = {}	
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end


--Clover卸载后残留
function f33737(id)
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Clover",k="UninstallString"}
	
	local scan_list = {}
	scan_list[1] = "%userprofile%\\AppData\\Local\\Clover"
	scan_list[2] = "%userprofile%\\AppData\LocalLow\\Clover"	
	scan_list[3] = "%userprofile%\\AppData\\LocalLow\\Clover.users"	
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\Clover"
	all_drivers_list[2] = "Program Files\\Clover"
	
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--智能云五笔输入法卸载后残留
function f33730(id)
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\智能云五笔输入法",k="UninstallString"}
	
	local scan_list = {}
	scan_list[1] = "%USERPROFILE%\\AppData\\LocalLow\\SmartCloudWBIME"
	scan_list[2] = "%USERPROFILE%\\AppData\\LocalLow\\SmartCloudWBIME.users"	
	
	local all_drivers_list = {}
	
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--BlueStacks卸载后残留
function f33725(id)
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\BluestacksCN",k="UninstallString"}
	
	local scan_list = {}
	scan_list[1] = "%userprofile%\\Local Settings\\Application Data\\Bluestacks"
	scan_list[2] = "%localappdata%\\Bluestacks"
	scan_list[3] = "%appdata%\\BluestacksCN\\ApkIcons"	
	
	local all_drivers_list = {}
		
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--智能云拼音输入法卸载后残留
function f33714(id)
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\智能云输入法",k="UninstallString"}
	
	local scan_list = {}
	scan_list[1] = "%USERPROFILE%\\AppData\\LocalLow\\SmartCloudIME"
	scan_list[2] = "%USERPROFILE%\\AppData\\LocalLow\\SmartCloudIME.users"	
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\SmartCloudInput"
	all_drivers_list[2] = "Program Files\\SmartCloudInput"
	
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--糖果游戏浏览器卸载后残留
function f33708(id)
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\糖果游戏浏览器",k="UninstallString"}
	
	local scan_list = {}
	scan_list[1] = "%appdata%\\tggame"
	scan_list[2] = "%localappdata%\\tggame"
	scan_list[3] = "%ProgramFiles(x86)%\\tggame"		
	
	local all_drivers_list = {}
	all_drivers_list[1] = "tggame"
	
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--全民助手卸载后残留
function f33690(id)
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\全民助手",k="UninstallString"}
	
	local scan_list = {}
	scan_list[1] = "%appdata%\\QuanMinData"
		
	
	local all_drivers_list = {}
	
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--PPT美化大师卸载后残留
function f33675(id)
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PPTAssist",k="UninstallString"}
	
	local scan_list = {}
	scan_list[1] = "%appdata%\\pptassist\\log"
	scan_list[2] = "%appdata%\\pptassist\\update"
	scan_list[3] = "%userprofile%\\AppData\\Local\\Temp\\pptassist"		
	
	local all_drivers_list = {}
	
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--千牛卸载后残留
function f33673(id)
	local app_name = "AliWorkbench.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\千牛工作台",k="UninstallString"}
	local scan_list = {}
	scan_list[1] = "%USERPROFILE%\\Local Settings\\Application Data\\aef\\AliWorkbench"
	scan_list[2] = "%localappdata%\\aef\\AliWorkbench"		
	
	local all_drivers_list = {}
	all_drivers_list[1] = "AliWorkbenchData"
	all_drivers_list[2] = "Program Files (x86)\\AliWorkbench"
	all_drivers_list[3] = "Program Files\\AliWorkbench"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--多玩我的世界盒子卸载后残留
function f33305(id)
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\多玩我的世界盒子",k="UninstallString"}
	
	local scan_list = {}
	scan_list[1] = "%AppData%\\duowan\\mcpcbox"
	scan_list[2] = "%AppData%\\duowan\\udb\\mcpcbox"	
	
	local all_drivers_list = {}
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--炉石传说盒子卸载后残留
function f33284(id)
	local app_name = "HSAng.exe"

	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{305ebdbe-8749-4857-ac7b-8d9a86b5ad68}_is1",k="UninstallString"}
	
	local scan_list = {}
	scan_list[1] = "%appdata%\\Netease\\HSA\\HSAng"
	scan_list[2] = "%appdata%\\Netease\\HSAng"	
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Netease\\HSA"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--多玩DNF盒子卸载后残留
function f33253(id)

	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\多玩DNF盒子2.5.0",k="UninstallString"}
	
	local scan_list = {}
	scan_list[1] = "%ProgramFILES%\\多玩DNF盒子"
	scan_list[2] = "%ProgramFiles(x86)%\\多玩DNF盒子"	
	
	local all_drivers_list = {}
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--360安全卫士残留文件
function f33201(id)
	local app_name = {} 
	app_name[1] = "360tray.exe"
	app_name[2] = "ZhuDongFangYu.exe"

	local scan_list = {}	
	scan_list[1] = "%ProgramFiles%\\360\\360safe"	
	scan_list[2] = "%ProgramFiles%\\360\\360safe\\safemon"
	scan_list[3] = "%ProgramFiles%\\360\\360safe\\deepscan"


	CheckAppNoRegScan(id,app_name,scan_list)
end

--TIM卸载后残留
function f33179(id)
	local app_name = "TIM.exe"
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\TIM",k="UninstallString"}

	local scan_list = {}	
	scan_list[1] = "%appdata%\\Tencent\\TIM"
	

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\Tencent\\TIM"
	all_drivers_list[2] = "Program Files\\Tencent\\TIM"
	

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--chrome浏览器卸载后残留
function f33110(id)
	local app_name = "chrome.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome",k="UninstallString"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome",k="UninstallString"}

	local scan_list = {}
	scan_list[1] = "%localappdata%\\Google\\Chrome"
	
	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--有道云笔记卸载后残留
function f33107(id)
	local app_name = "YoudaoNote.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\有道笔记",k="UninstallString"}

	local scan_list = {}
	scan_list[1] = "%localappdata%\\Youdao\\YNote"
	scan_list[2] = "%localappdata%\\YNote"	
	
	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end


--看看影音卸载后残留
function f32801(id)
	local app_name = "KKP.exe"
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\看看影音",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Video Legend\\KKP",k="Path"}

	local scan_list = {}
	scan_list[1] = "%AppData%\\Video Legend"
	scan_list[2] = "%public%\\Video Legend"
	

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\Video Legend\\KKP\\Program"
	all_drivers_list[2] = "Program Files (x86)\\Video Legend\\KKP\\Program"
	all_drivers_list[3] = "Program Files\\Video Legend\\KKP"
	all_drivers_list[4] = "Program Files (x86)\\Video Legend\\KKP"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--百度卫士卸载后残留
function f32604(id)
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\百度卫士",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Baidu\\BaiduAn",k="InstallDir"}

	local scan_list = {}
	scan_list[1] = "%allusersprofile%\\Application Data\\Baidu\\BaiduAn"
	scan_list[2] = "%allusersprofile%\\Baidu\\BaiduAn"
	

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\Baidu\\BaiduAn"
	all_drivers_list[2] = "Program Files (x86)\\Baidu\\BaiduAn"

	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--Skype卸载后残留
function f32312(id)
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{4E76FF7E-AEBA-4C87-B788-CD47E5425B9D}",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{1845470B-EB14-4ABC-835B-E36C693DC07D}",k="DisplayIcon"}
	reg_list[3] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{7A3C7E05-EE37-47D6-99E1-2EB05A3DA3F7}",k="DisplayIcon"}
	reg_list[4] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{FC965A47-4839-40CA-B618-18F486F042C6}",k="DisplayIcon"}
	reg_list[5] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Skype\\Phone",k="SkypeFolder"}
	reg_list[6] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Skype",k="DisplayIcon"}

	local scan_list = {}
	--scan_list[1] = "%appdata%\\Skype"
	scan_list[1] = "%LocalAppData%\\Temp\\Skype"
	scan_list[2] = "%allusersprofile%\\Skype"
	scan_list[3] = "%ALLUSERSPROFILE%\\Application Data\\Skype"
	scan_list[4] = "%userprofile%\\Tracing\\WPPMedia"
	

	local all_drivers_list = {}

	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end


--PPS影音卸载后残留
function f7800(id)
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{B5A73F54-B5D2-455A-99E0-6B8BEB2C59F3}_is1",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PPStream",k="DisplayIcon"}

	local scan_list = {}
	scan_list[1] = "%appdata%\\PPStream"

	local all_drivers_list = {}
	all_drivers_list[1] = "ppsfile"
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--PPTV视频卸载后残留
function f7802(id)
	local app_name = "PPLive.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PPLive",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\PPTV.exe",k=""}

	local scan_list = {}
	scan_list[1] = "%allusersprofile%\\Application Data\\PPLive\\PPTV"
	scan_list[2] = "%allusersprofile%\\PPLive\\PPTV"
	scan_list[3] = "%allusersprofile%\\Application Data\\jlcm"
	scan_list[4] = "%allusersprofile%\\jlcm"
	scan_list[5] = "%Appdata%\\PPLive\\PPTV"
	scan_list[6] = "%userprofile%\\Documents\\PPTV"
	scan_list[7] = "%userprofile%\\My Documents\\PPTV"
	scan_list[8] = "%ProgramFILES%\\Internet Explorer\\PPLite"
	scan_list[9] = "%ProgramFiles(x86)%\\Internet Explorer\\PPLite"
	scan_list[10] = "%USERPROFILE%\\Appdata\\LocalLow\\PPLive"
	scan_list[11] = "%allusersprofile%\\Application Data\\PPLive\\Core"
	scan_list[12] = "%allusersprofile%\\PPLive\\Core"
	scan_list[13] = "%allusersprofile%\\Application Data\\Microsoft\\Windows\\Start Menu\\Programs\\PPLive"
	scan_list[14] = "%allusersprofile%\\Microsoft\\Windows\\Start Menu\\Programs\\PPLive"
	scan_list[15] = "%allusersprofile%\\Application Data\\PPLive\\Jlcm"
	scan_list[16] = "%allusersprofile%\\PPLive\\Jlcm"
	scan_list[17] = "%Appdata%\\PPLive\\Codec"
	scan_list[18] = "%CommonProgramW6432%\\PPLiveNetwork"
	scan_list[19] = "%CommonProgramFiles%\\PPLiveNetwork"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\PPLive\\PPTV"
	all_drivers_list[2] = "Program Files (x86)\\PPLive\\PPTV"
	all_drivers_list[3] = "PPTV"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--QQ旋风卸载后残留
function f7804(id)
	local app_name = "QQDownload.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\QQ旋风",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Tencent\\QQDownload",k=""}

	local scan_list = {}
	scan_list[1] = "%allusersprofile%\\Application Data\\Tencent\\QQDownload"
	scan_list[2] = "%allusersprofile%\\Tencent\\QQDownload"
	scan_list[3] = "%Appdata%\\Tencent\\QQPCMgr\\Download"
	scan_list[4] = "%Appdata%\\Tencent\\QQDownload"
	scan_list[5] = "%Appdata%\\Microsoft\\Windows\\Start Menu\\Programs\\腾讯软件\\QQ旋风"

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\Tencent\\QQDownload"
	all_drivers_list[2] = "Program Files (x86)\\Tencent\\QQDownload"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--QQ游戏大厅卸载后残留
function f32167(id)
	local app_name = "QQGame.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_CURRENT_USER\\SOFTWARE\\Tencent\\QQGame\\SYS",k="HallDirectory"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\SOFTWARE\\Tencent\\QQGame\\SYS",k="GameDirectory"}

	local scan_list = {}
	scan_list[1] = "%Appdata%\\Tencent\\QQGame"
	scan_list[2] = "%Appdata%\\Tencent\\QQGameTempest"

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\Tencent\\QQGame"
	all_drivers_list[2] = "Program Files (x86)\\Tencent\\QQGame"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--QQ音乐卸载后残留
function f7806(id)
	local app_name = "QQMusic.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\QQMusic",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Tencent\\QQMusic",k="Install"}

	local scan_list = {}
	scan_list[1] = "%localappdata%\\Microsoft\\Windows\\Temporary Internet Files\\Low\\Tencent\\MMInstallCache"
	--scan_list[0] = "%appdata%\\Tencent\\QQMusic" （暂时下线排查）
	scan_list[2] = "%appdata%\\Tencent\\QQMusicMMInstallCache"
	scan_list[3] = "%appdata%\\Tencent\\TXSSO\\SSOConfig\\AppDB\\_TSA_QQ音乐"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\Tencent\\QQMusic"
	all_drivers_list[2] = "Program Files (x86)\\Tencent\\QQMusic"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--爱奇艺视频卸载后残留
function f7808(id)
	local app_name = "QyClient.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\爱奇艺视频",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\IQIYI Video",k="DisplayIcon"}
	reg_list[3] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\QiyiClient.exe",k=""}
	reg_list[4] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PPStream",k="DisplayIcon"}
	reg_list[5] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GeePlayer", k="DisplayIcon"}

	local scan_list = {}
	scan_list[1] = "%public%\\QiYi"
	scan_list[2] = "%allusersprofile%\\Application Data\\IQIYI Video"
	scan_list[3] = "%allusersprofile%\\IQIYI Video"
	scan_list[4] = "%allusersprofile%\\Application Data\\Qiyi"
	scan_list[5] = "%allusersprofile%\\Qiyi"
	scan_list[6] = "%userprofile%\\My Documents\\QiyiVideoLibrary"
	scan_list[7] = "%userprofile%\\Documents\\QiyiVideoLibrary"
	scan_list[8] = "%APPDATA%\\iQiyi"
	scan_list[9] = "%APPDATA%\\Qiyi"
	scan_list[10] = "%APPDATA%\\IQIYI Video\\PStyle"
	scan_list[11] = "%APPDATA%\\IQIYI Video\\LStyle"
 	scan_list[12] = "%APPDATA%\\IQIYI Video\\Geeplayer"
	
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\IQIYI Video\\PStyle"
	all_drivers_list[2] = "Program Files (x86)\\IQIYI Video\\PStyle"
	all_drivers_list[3] = "Qiyi\\Cache"
	all_drivers_list[4] = "qycache"
		
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--百度浏览器卸载后残留
function f7810(id)
	local app_name = "baidubrowser.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\BaiduBrowser",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\baidubrowser.exe",k=""}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\百度浏览器",k="DisplayIcon"}

	local scan_list = {}
	scan_list[1] = "%allusersprofile%\\Application Data\\Baidu\\BaiduBrowserGA"
	scan_list[2] = "%allusersprofile%\\Baidu\\BaiduBrowserGA"
	scan_list[3] = "%APPDATA%\\Baidu\\browser"
	scan_list[4] = "%APPDATA%\\Baidu\\BaiduBrowser"
	scan_list[5] = "%LOCALAPPDATA%\\Baidu\\BaiduBrowser"	

	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\baidu\\BaiduBrowser"
	all_drivers_list[2] = "Program Files (x86)\\baidu\\BaiduBrowser"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--百度影音浏览器卸载后残留
function f7812(id)
	local reg_list = {}
	
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\BaiduPlayer2",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Baidu.FacePack",k=""}

	local scan_list = {}
	scan_list[1] = "%allusersprofile%\\Application Data\\Baidu\\BaiduPlayer"
	scan_list[2] = "%allusersprofile%\\Baidu\\BaiduPlayer"
	scan_list[3] = "%USERPROFILE%\\Appdata\\LocalLow\\Baidu\\player2"
	scan_list[4] = "%localappdata%\\baidu\\BaiduPlayer2"
	scan_list[5] = "%APPDATA%\\baidu\\BaiduPlayer"
	scan_list[6] = "%APPDATA%\\baidu\\BaiduPlayer2"
	scan_list[7] = "%APPDATA%\\baidu\\BaiduPlayerBrowser"
	scan_list[8] = "%APPDATA%\\baidu\\hao123"
	scan_list[9] = "%USERPROFILE%\\Appdata\\LocalLow\\Baidu\\player"
	scan_list[10] = "%allusersprofile%\\Application Data\\Baidu\\BaiduPlayer2"
	scan_list[11] = "%USERPROFILE%\\Appdata\\LocalLow\\Baidu\\baiduplayerbrowser"
	
	local all_drivers_list = {}
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--暴风影音卸载后残留
function f7814(id)
	local app_name = "StormPlayer.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\StormPlayer",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\Software\\Baofeng\\StormPlayer",k="Install Path"}
	reg_list[3] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\StormPlayer.exe",k=""}

	local scan_list = {}
	scan_list[1] = "%userprofile%\\My Documents\\暴风影视库"
	scan_list[2] = "%userprofile%\\Documents\\暴风影视库"
	scan_list[3] = "%allusersprofile%\\Application Data\\Baofeng\\StormPlayer"
	scan_list[4] = "%allusersprofile%\\Baofeng\\StormPlayer"
	scan_list[5] = "%systemroot%\\System32\\Storm"

	scan_list[6] = "%allusersprofile%\\Application Data\\Baofeng\\StormPlayer"
	scan_list[7] = "%systemroot%\\SysWOW64\\Storm"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "StormMedia"
	all_drivers_list[2] = "Program Files\\Baofeng\\StormPlayer"
	all_drivers_list[3] = "Program Files (x86)\\Baofeng\\StormPlayer"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--风行卸载后残留
function f7816(id)
	local app_name = "Funshion.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Funshion",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Funshion\\Funshion",k=""}

	local scan_list = {}
	scan_list[1] = "%Public%\\Fundata"
	scan_list[2] = "%USERPROFILE%\\Funshion"
	scan_list[3] = "%allusersprofile%\\Application Data\\Fundata"
	scan_list[4] = "%allusersprofile%\\Fundata"	
	scan_list[5] = "%appdata%\\Funshion"

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\Funshion Online"
	all_drivers_list[2] = "Program Files (x86)\\Funshion Online"
	all_drivers_list[3] = "FunshionMedia"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--金山手机助手卸载后残留
function f7818(id)
	local app_name = "shoujizhushou.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\金山手机助手",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\金山手机助手",k=""}

	local scan_list = {}
	scan_list[1] = "%allusersprofile%\\Application Data\\Kingsoft\\Shoujikong"
	scan_list[2] = "%allusersprofile%\\Kingsoft\\Shoujikong"
	scan_list[3] = "%AppData%\\shoujizhushou"
	scan_list[4] = "%ALLUSERSPROFILE%\\application data\\Kingsoft\\Shoujikong"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\kingsoft\\shoujizhushou"
	all_drivers_list[2] = "Program Files (x86)\\kingsoft\\shoujizhushou"
	all_drivers_list[3] = "Program Files\\shoujizhushou"
	all_drivers_list[4] = "Program Files (x86)\\shoujizhushou"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--酷狗音乐卸载后残留
function f7820(id)
	local app_name = "KuGou.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\酷狗音乐",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\Software\\KuGou",k="AppDataPath"}

	local scan_list = {}
	scan_list[1] = "%Appdata%\\KGDataBak"
	scan_list[2] = "%Appdata%\\KuGou8"
	scan_list[3] = "%Appdata%\\KuGou7"
	scan_list[4] = "%Appdata%\\KuGou"
	scan_list[5] = "%allusersprofile%\\KuGou"

	local all_drivers_list = {}
	all_drivers_list[1] = "KuGouCache"
	all_drivers_list[2] = "KuGou\\Temp"
	all_drivers_list[3] = "KuGou\\Cache"
	all_drivers_list[4] = "Program Files\\KuGou\\KGMusic"
	all_drivers_list[5] = "Program Files (x86)\\KuGou\\KGMusic"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--酷我音乐卸载后残留
function f7822(id)
	local app_name = "KwMusic.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\KwMusic7",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\kuwo",k=""}
  	reg_list[3] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\酷我音乐",k="DisplayIcon"}

	local scan_list = {}
	scan_list[1] = "%allusersprofile%\\Application Data\\kuwodata"
	scan_list[2] = "%allusersprofile%\\kwmusic"
 	scan_list[3] = "%allusersprofile%\\kuwodata"
  	scan_list[4] = "%localappdata%\\kwmusic"
  	scan_list[5] = "%localappdata%\\Kwgmusic" 
    scan_list[6] = "%appdata%\\kmajor5956"	
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\kuwo\\kuwomusic"
	all_drivers_list[2] = "Program Files (x86)\\kuwo\\kuwomusic"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--快快游戏卸载后残留
function f7824(id)
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\快快游戏",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\Software\\duowan\\gamebox",k="InstallDir"}

	local scan_list = {}
	scan_list[1] = "%allusersprofile%\\Application Data\\KuaiKuai"
	scan_list[2] = "%allusersprofile%\\KuaiKuai"
	scan_list[3] = "%appdata%\\duowan\\gamebox"
	
	local all_drivers_list = {}
	
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--快玩游戏盒子卸载后残留
function f7826(id)
	local app_name = "Kuaiwan.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Kuaiwan",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\Software\\Kuaiwan",k="path"}

	local scan_list = {}
	scan_list[1] = "%allusersprofile%\\Application Data\\KuaiWan"
	scan_list[2] = "%allusersprofile%\\KuaiWan"

	
	local all_drivers_list = {}
	all_drivers_list[1] = "KuaiwanGames\\Patch"
	all_drivers_list[2] = "Program Files\\KuaiWan"
	all_drivers_list[3] = "Program Files (x86)\\KuaiWan"
	all_drivers_list[4] = "Kuaiwan"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--皮皮影音卸载后残留
function f7828(id)
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PIPI_is1",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\ppfilm",k=""}

	local scan_list = {}
	scan_list[1] = "%appdata%\\PIPI"
	scan_list[2] = "%USERPROFILE%\\Appdata\\LocalLow\\PIPI"
	
	local all_drivers_list = {}
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--驱动精灵卸载后残留
function f7830(id)
	local app_name = "drivergenius.exe"
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\DriverGenius",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\MyDrivers\\Drivergenius",k="AppPath"}

	local scan_list = {}
	scan_list[1] = "%Appdata%\\dg"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\DriverGenius"
	all_drivers_list[2] = "Program Files (x86)\\DriverGenius"	

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--搜狗浏览器卸载后残留
function f7832(id)
	local app_name = "SogouExplorer.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\SogouExplorer",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\SogouExplorer",k="DisplayIcon"}

	local scan_list = {}
	scan_list[1] = "%Appdata%\\Microsoft\\Windows\\Start Menu\\Programs\\搜狗高速浏览器"
	scan_list[2] = "%appdata%\\SogouExplorer"
	scan_list[3] = "%localappdata%\\SogouExplorer"
	scan_list[4] = "%userprofile%\\Application Data\\SogouExplorer"	
		
	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--搜狐影音卸载后残留
function f7834(id)
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\搜狐影音",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\SOHU\\SoHuVA\\InstallPath",k="Path"}

	local scan_list = {}
	scan_list[1] = "%userprofile%\\My Documents\\搜狐影音"
	scan_list[2] = "%userprofile%\\Documents\\搜狐影音"
	scan_list[3] = "%allusersprofile%\\Microsoft\\Windows\\Start Menu\\Programs\\搜狐影音"
	scan_list[4] = "%allusersprofile%\\Application Data\\Microsoft\\Windows\\Start Menu\\Programs\\搜狐影音"
	
	local all_drivers_list = {}
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--豌豆荚卸载后残留
function f7838(id)
	local app_name = "wandoujia2.exe"
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Wandoujia2",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Wandoujia",k=""}

	local scan_list = {}
	scan_list[1] = "%localappdata%\\Wandoujia"
	scan_list[2] = "%APPDATA%\\Wandoujia2"
	scan_list[3] = "%LOCALAPPDATA%\\Wandoujia"
	scan_list[4] = "%LOCALAPPDATA%\\Wandoujia2"
	scan_list[5] = "%APPDATA%\\WandoujiaUsbDriver"

	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\WandouLabs"
	all_drivers_list[2] = "Program Files (x86)\\WandouLabs"
	all_drivers_list[3] = "Program Files\\wandoujia"
	all_drivers_list[4] = "Program Files (x86)\\wandoujia"
	all_drivers_list[5] = "WandouLabs"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--西瓜影视卸载后残留
function f7840(id)
	local app_name = "xigua.exe"
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARrE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\西瓜",k="UninstallString"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\xigua",k=""}

	local scan_list = {}
	scan_list[1] = "%USERPROFILE%\\Appdata\\LocalLow\\xigua"
	scan_list[2] = "%USERPROFILE%\\Appdata\\LocalLow\\XiGuaPlayer"
	scan_list[3] = "%LocalAppData%\\Temp\\xigua"
	scan_list[4] = "%ALLUSERSPROFILE%\\Application Data\\xigua"
	scan_list[5] = "%AppData%\\..\\Application Data\\xigua"
	scan_list[6] = "%AppData%\\..\\Application Data\\XiGuaPlayer"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\xigua"
	all_drivers_list[2] = "Program Files (x86)\\xigua"
	all_drivers_list[3] = "xigua"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--迅雷看看-迅雷影音卸载后残留
function f7842(id)
	local app_name = "XMP.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\迅雷看看播放器",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\迅雷影音",k="DisplayIcon"}
	reg_list[3] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\XMP.exe",k=""}

	local scan_list = {}

	scan_list[1] = "%allusersprofile%\\Application Data\\Microsoft\\Windows\\Start Menu\\Programs\\迅雷软件\\迅雷看看播放器"
	scan_list[2] = "%allusersprofile%\\Microsoft\\Windows\\Start Menu\\Programs\\迅雷软件\\迅雷看看播放器"
	scan_list[3] = "%public%\\Thunder Network\\KanKan"
	scan_list[3] = "%public%\\Thunder Network\\KKVideo"
	scan_list[4] = "%CommonProgramFiles%\\Thunder Network\\Kankan"
	scan_list[5] = "%CommonProgramFiles(x86)%\\Thunder Network\\Kankan"
	scan_list[6] = "%public%\\Thunder Network\\KKVideo"
	scan_list[7] = "%public%\\Thunder Network\\XMP5"
	scan_list[8] = "%ProgramData%\\Microsoft\\Windows\\Start Menu\\Programs\\迅雷软件\\迅雷影音-影视片库"
	scan_list[9] = "%public%\\Thunder Network\\ThunderNews"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "kankan\\VaCache"
	all_drivers_list[2] = "Program Files\\Thunder Network\\Kankan"
	all_drivers_list[3] = "Program Files (x86)\\Thunder Network\\Kankan"
	all_drivers_list[4] = "Program Files\\Thunder Network\\Xmp"
	all_drivers_list[5] = "Program Files (x86)\\Thunder Network\\Xmp"
	all_drivers_list[6] = "Xmp"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--影音先锋卸载后残留
function f7844(id)

	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\yyxfplayer_is1",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\Software\\xfplay",k=""}

	local scan_list = {}
	scan_list[1] = "%APPDATA%\\xfplayer"
	scan_list[2] = "%USERPROFILE%\\Appdata\\LocalLow\\xfplay"
	scan_list[3] = "%ALLUSERSPROFILE%\\Application Data\\xfplay"
	scan_list[4] = "%ALLUSERSPROFILE%\\xfplay"
	
	local all_drivers_list = {}
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--优酷视频卸载后残留
function f7846(id)
	local app_name = "YoukuDesktop.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\YoukuClient",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\Software\\YouKu\\YoukuClient",k="Path"}

	local scan_list = {}
	scan_list[1] = "%userprofile%\\My Documents\\Youku Files"
	scan_list[2] = "%userprofile%\\Documents\\Youku Files"
	scan_list[3] = "%appdata%\\youku"
	scan_list[4] = "%Appdata%\\Microsoft\\Windows\\Start Menu\\Programs\\优酷土豆\\优酷客户端"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Youku Files\\download\\temp"
	all_drivers_list[2] = "Youku Files\\youkudisk"
	all_drivers_list[3] = "Program Files\\youku\\YoukuClient"
	all_drivers_list[4] = "Program Files (x86)\\youku\\YoukuClient"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--金山毒霸卸载后残留
function f7848(id)
	local app_name = "kxetray.exe"
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Kingsoft Internet Security",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\Software\\kingsoft\\Antivirus",k=""}

	local scan_list = {}
	scan_list[1] = "%allusersprofile%\\Application Data\\KingSoft\\DUBA"
	scan_list[2] = "%allusersprofile%\\Application Data\\KingSoft\\kwfsdata"
	scan_list[3] = "%allusersprofile%\\Application Data\\KingSoft\\ksbw"
	scan_list[4] = "%allusersprofile%\\Application Data\\KingSoft\\kheur"
	scan_list[5] = "%allusersprofile%\\Application Data\\KingSoft\\kfc"
	scan_list[6] = "%allusersprofile%\\Application Data\\KSafeCommon"
	scan_list[7] = "%allusersprofile%\\KingSoft\\DUBA"
	scan_list[8] = "%allusersprofile%\\KingSoft\\kwfsdata"
	scan_list[9] = "%allusersprofile%\\KingSoft\\ksbw"
	scan_list[10] = "%allusersprofile%\\KingSoft\\kheur"
	scan_list[11] = "%allusersprofile%\\KingSoft\\kfc"
	scan_list[12] = "%allusersprofile%\\KSafeCommon"
	scan_list[13] = "%Appdata%\\KingSoft\\kvip"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\KingSoft\\Kingsoft antivirus"
	all_drivers_list[2] = "Program Files (x86)\\KingSoft\\Kingsoft antivirus"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--360安全浏览器卸载后残留
function f33611(id)
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\360se6",k="UninstallString"}	

	local scan_list = {}
	scan_list[1] = "%APPDATA%\\360se6\\apps"
	scan_list[2] = "%APPDATA%\\360se6\\User Data"
	
	local all_drivers_list = {}
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--YY浏览器卸载后残留
function f7850(id)
	local app_name = "YYExplorer.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\YYExplorer",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\Software\\duowan\\YYExplorer",k="InstallDir"}

	local scan_list = {}
	scan_list[1] = "%localappdata%\\YYExplorer"
	scan_list[2] = "%appdata%\\duowan\\YYExplorer"
	scan_list[3] = "%appdata%\\udb\\YYExplorer"
	scan_list[4] = "%Localappdata%\\Temp\\YYExplorer_InstallTmp"
	scan_list[5] = "%Localappdata%\\Temp\\yyexplorer_dump"
		
	local all_drivers_list = {}
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--2345浏览器卸载后残留
function f50001(id)
	local app_name = "2345Explorer.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\2345Explorer",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\2345Explorer.exe",k=""}

	local scan_list = {}
	scan_list[1] = "%appdata%\\2345Explorer"
	scan_list[2] = "%LOCALAPPDATA%\\2345Explorer"
	scan_list[3] = "%Systemroot%\\SysWOW64\\config\\systemprofile\\AppData\\Local\\2345Explorer\\User Data\\Crash Reports"
	scan_list[4] = "%userprofile%\\Local Settings\\Application Data\\2345Explorer"
	scan_list[5] = "%userprofile%\\Local Settings\\Temp\\2345Explorer"
	scan_list[6] = "%userprofile%\\My Documents\\2345截图"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\2345Soft\\2345Explorer"
	all_drivers_list[2] = "Program Files (x86)\\2345Soft\\2345Explorer"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--百度杀毒卸载后残留
function f50003(id)
	local app_name = "BaiduSd.exe"
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\百度杀毒",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Baidu\\BaiduSd",k="installDir"}

	local scan_list = {}
	scan_list[1] = "%allusersprofile%\\Application Data\\Baidu\\BaiduSd"
	scan_list[2] = "%allusersprofile%\\Baidu\\BaiduSd"
	scan_list[3] = "%ProgramData%\\BaiduBaiduSd"
	scan_list[4] = "%CommonProgramW6432%\\Baidu\\BaiduHips"
	scan_list[5] = "%CommonProgramFiles%\\Baidu\\BaiduHips"

	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\Baidu\\BaiduSd"
	all_drivers_list[2] = "Program Files (x86)\\Baidu\\BaiduSd"
	all_drivers_list[3] = "BaiduSd"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--百度输入法卸载后残留
function f50005(id)
	local app_name = "baidupinyin.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\	BaiduPinyin",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Baidu\\BaiduPinyin",k="installDir"}

	local scan_list = {}
	scan_list[1] = "%USERPROFILE%\\Appdata\\LocalLow\\Baidu\\BaiduPinyin"
	scan_list[2] = "%APPDATA%\\Baidu\\BaiduPinyin"
	scan_list[3] = "%allusersprofile%\\Application Data\\Baidu\\BaiduPinyin"
	scan_list[4] = "%allusersprofile%\\Baidu\\BaiduPinyin"
	scan_list[5] = "%LOCALAPPDATA%\\BaiduPinyin"
	scan_list[6]  = "%ProgramFiles%\\Baidu\\BaiduPinyinUpdate"	
	scan_list[7]  = "%ProgramFiles(x86)%\\Baidu\\BaiduPinyinUpdate"
	scan_list[8] = "%userprofile%\\Local Settings\\Temp\\Baidu\\BaiduPinyin"
	scan_list[8] = "%userprofile%\\Application Data\\Baidu\\BaiduPinyin"
	scan_list[9] = "%CommonProgramW6432%\\Baidu\\BaiduPinyin"
	scan_list[10] = "%CommonProgramFiles%\\Baidu\\BaiduPinyin"	

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\Baidu\\BaiduPinyin"
	all_drivers_list[2] = "Program Files (x86)\\Baidu\\BaiduPinyin"	

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--千千音乐(新版)卸载后残留
function f50007(id)
	local app_name = "BaiduMusic.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\BaiduMusic",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Baidu\\BaiduMusic",k="installDir"}

	local scan_list = {}
	scan_list[1] = "%APPDATA%\\Baidu\\BaiduMusic"
	scan_list[2] = "%allusersprofile%\\Application Data\\Baidu\\BaiduMusic"
	scan_list[3] = "%allusersprofile%\\Baidu\\BaiduMusic"
	scan_list[4] = "%LOCALAPPDATA%\\BaiduMusic"
	scan_list[5] = "%userprofile%\\Application Data\\Baidu\\BaiduMusic"
	scan_list[6] = "%userprofile%\\Local Settings\\Application Data\\BaiduMusic"
	scan_list[7] = "%allusersprofile%\\Application Data\\Baidu\\BaiduMusic\\baidumusic2014"

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\Baidu\\BaiduMusic"
	all_drivers_list[2] = "Program Files (x86)\\Baidu\\BaiduMusic"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--千千音乐梦幻版卸载后残留
function f50009(id)
	local app_name = "BaiduMusicAIO.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\BaiduMusicAIO",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Baidu\\\BaiduMusicAIO",k="installDir"}

	local scan_list = {}
	scan_list[1] = "%APPDATA%\\Baidu\\BaiduMusicAIO"
	scan_list[2] = "%allusersprofile%\\Application Data\\Baidu\\BaiduMusic\\baidumusicaio"
	scan_list[3] = "%allusersprofile%\\Baidu\\BaiduMusic\\baidumusicaio"
	scan_list[4] = "%LOCALAPPDATA%\\BaiduMusicAIO"
	scan_list[5] = "%userprofile%\\Application Data\\Baidu\\BaiduMusicAIO"
	scan_list[6] = "%userprofile%\\Local Settings\\Application Data\\BaiduMusicAIO"
	scan_list[7] = "%programdata%\\Baidu\\BaiduMusicAIO"

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\Baidu\\BaiduMusicAIO"
	all_drivers_list[2] = "Program Files (x86)\\Baidu\\BaiduMusicAIO"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--百度影音卸载后残留
function f50011(id)
	local app_name = "BaiduPlayer.exe"

	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\BaiduPlayer",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Baidu\\BaiduPlayer",k="installDir"}

	local scan_list = {}
	scan_list[1] = "%USERPROFILE%\\Appdata\\LocalLow\\Baidu\\BaiduPlayerContent"
	scan_list[2] = "%APPDATA%\\Baidu\\baiduplayer4"
	scan_list[3] = "%allusersprofile%\\Application Data\\Baidu\\BaiduPlayerContent"
	scan_list[4] = "%allusersprofile%\\Baidu\\BaiduPlayerContent"
	scan_list[5] = "%allusersprofile%\\Application Data\\Baidu\\BaiduPlayer"
	scan_list[6] = "%allusersprofile%\\Baidu\\BaiduPlayer"
	scan_list[7] = "%userprofile%\\Local Settings\\Temp\\Baidu\\BaiduSetupAx"
	scan_list[8] = "%userprofile%\\Local Settings\\LocalLow\\Baidu\\BaiduPlayer"
	scan_list[9] = "%systemdrive%\\Documents and Settings\\LocalService\\Application Data\\Baidu\\baiduplayer4"
	scan_list[10] = "%APPDATA%\\Baidu\\BDPlayer"
	scan_list[11] = "%APPDATA%\\Baidu\\baiduplayer"

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\Baidu\\BaiduPlayer"
	all_drivers_list[2] = "Program Files (x86)\\Baidu\\BaiduPlayer"
	all_drivers_list[2] = "BaiduPlayer"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--快播卸载后残留
function f50013(id)
	local app_name = "QvodPlayer.exe"

	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\QvodPlayer",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\QvodPlayer.exe",k=""}

	local scan_list = {}
	scan_list[1] = "%allusersprofile%\\Application Data\\QvodPlayer"
	scan_list[2] = "%allusersprofile%\\QvodPlayer"
	scan_list[3] = "%ProgramData%\\QvodPlayer"
	scan_list[4] = "%userprofile%\\Local Settings\\Temp\\qvod_temp_Directory"
	scan_list[5] = "%allusersprofile%\\QvodPlayer"
	scan_list[6] = "%userprofile%\\Local Settings\\Temp\\QvodTemp"

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\QvodPlayer"
	all_drivers_list[2] = "Program Files (x86)\\QvodPlayer"
	all_drivers_list[3] = "QvodPlayer"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--乐视视频卸载后残留
function f50015(id)
	local app_name = "LeTVLoader.exe"

	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\乐视视频",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\LeTVLoader.exe",k=""}

	local scan_list = {}
	scan_list[1] = "%APPDATA%\\Letv"
	scan_list[2] = "%appdata%\\LmpPlayer"
	scan_list[3] = "%userprofile%\\Application Data\\Letv"

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\Letv"
	all_drivers_list[2] = "Program Files (x86)\\Letv"
	all_drivers_list[3] = "Letv"
	all_drivers_list[4] = "LETVdownload"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--瑞星杀毒软件卸载后残留
function f50017(id)
	local app_name = "rsmain.exe"

	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\RAV",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\RMC",k="DisplayIcon"}
	reg_list[3] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\RZC",k="DisplayIcon"}

	local scan_list = {}
	scan_list[1] = "%allusersprofile%\\Rising"
	scan_list[2] = "%allusersprofile%\\Application Data\\Rising\\rav"	
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\Rising\\RAV"
	all_drivers_list[2] = "Program Files (x86)\\Rising\\RAV"
	all_drivers_list[3] = "Program Files\\Rising\\setttings\\RAV"
	all_drivers_list[4] = "Program Files (x86)\\Rising\\settings\\RAV"	
	all_drivers_list[5] = "Rising\\RAV"
	all_drivers_list[6] = "%public%\\Documents\\Rising\\rse"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--简单百宝箱卸载后残留
function f34115(id)
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\简单百宝箱_is1",k="UninstallString"}
		
	local scan_list = {}
	scan_list[1] = "%appdata%\\shortcuttemp"

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\Jdbbx"
	all_drivers_list[2] = "Program Files\\Jdbbx"
	
	
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--极速压缩卸载后残留
function f34122(id)
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\JiSuZip",k="UninstallString"}

	local scan_list = {}

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\Maoha"
	all_drivers_list[2] = "Program Files\\Maoha"
	all_drivers_list[3] = "Maoha"
	all_drivers_list[4] = "JiSuZip"
	
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--搜狗高速浏览器尝鲜版卸载后残留
function f50019(id)
	local reg_list = {}
	reg_list[1] = {p="HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\SogouExplorer_Dev",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\Software\\SogouExplorer_Dev",k="installpath"}

	local scan_list = {}
	scan_list[1] = "%appdata%\\SogouExplorer_Dev"
	scan_list[2] = "%public%\\SogouExplorer"

	local all_drivers_list = {}
	
	CheckAndScan(id,reg_list,scan_list,all_drivers_list)
end

--搜狗手机助手卸载后残留
function f50021(id)
	local app_name = "SogouMobileTool.exe"

	local reg_list = {}
	reg_list[1] = {p="HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\SogouMobileTool",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\Software\\SogouMobileTool",k=""}

	local scan_list = {}
	scan_list[1] = "%appdata%\\SogouMobileTool"
	scan_list[2] = "%LOCALAPPDATA%\\SogouMobileTool"

	local all_drivers_list = {}
	all_drivers_list[1] = "SogouMobileTool"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--腾讯视频(QQLive)卸载后残留
function f50023(id)
	local app_name = "QQLive.exe"

	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\qqlive",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Tencent\\qqlive",k="install"}

	local scan_list = {}
	scan_list[1] = "%appdata%\\Tencent\\QQLive"
	scan_list[2] = "%allusersprofile%\\Application Data\\Tencent\\QQLive"
	scan_list[3] = "%allusersprofile%\\Tencent\\QQLive"
	scan_list[4] = "%userprofile%\\Local Settings\\Temp\\QQLive"

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\Tencent\\QQLive"
	all_drivers_list[2] = "Program Files (x86)\\Tencent\\QQLive"
	all_drivers_list[3] = "QQLive"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--有道词典卸载后残留
function f50025(id)
	local app_name = "YoudaoDict.exe"

	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\有道词典",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\有道词典",k="DisplayIcon"}
	reg_list[3] = {p="HKEY_CURRENT_USER\\Software\\Yodao\\DeskDict",k="Install"}
	reg_list[4] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Yodao\\DeskDict",k="Install"}
	reg_list[5] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\网易有道词典",k="UninstallString"}
	reg_list[6] = {p="HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\网易有道词典",k="DisplayIcon"}

	local scan_list = {}
	scan_list[1] = "%LOCALAPPDATA%\\Youdao\\DeskDict"
	scan_list[2] = "%LOCALAPPDATA%\\Yodao\\DeskDict"
	scan_list[3] = "%LOCALAPPDATA%\\Youdao\\Dict\\Application"
	scan_list[4] = "%allusersprofile%\\Application Data\\Youdao\\DeskDict"
	scan_list[5] = "%allusersprofile%\\Youdao\\DeskDict"
	scan_list[6] = "%userprofile%%\\Local Settings\\Application Data\\Youdao"

	local all_drivers_list = {}

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--百度云管家卸载后残留
function f50027(id)
	local app_name = "BaiduYunGuanjia.exe"

	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\百度云管家",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Baidu\\BaiduYunGuanjia",k="installDir"}

	local scan_list = {}
	scan_list[1] = "%appdata%\\BaiduYunGuanjia"
	scan_list[2] = "%appdata%\\BaiduYunKernel"
	scan_list[3] = "%appdata%\\Baidu\\BaiduYunGuanjia"

	local all_drivers_list = {}
	all_drivers_list[1] = "Baidu\\BaiduYunGuanjia"
	all_drivers_list[2] = "BaiduYunGuanjia"
	all_drivers_list[3] = "Program Files\\Baidu\\BaiduYunGuanjia"
	all_drivers_list[4] = "Program Files (x86)\\Baidu\\BaiduYunGuanjia"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--芒果TV卸载后残留
function f50028(id)
	local app_name = "HunanTV.exe"

	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\HunanTV",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\HunanTV",k="installpath"}

	local scan_list = {}
	scan_list[1] = "%allusersprofile%\\hunantv"
	scan_list[2] = "%allusersprofile%\\application data\\hunantv"

	local all_drivers_list = {}
	all_drivers_list[1] = "HunanTV.cache"
	all_drivers_list[2] = "Program Files\\HunanTV"
	all_drivers_list[3] = "Program Files (x86)\\HunanTV"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--芒果TV卸载后残留
function f33146(id)
	local app_name = "mgtv.exe"

	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\mgtv",k="DisplayIcon"}	

	local scan_list = {}
	scan_list[1] = "%allusersprofile%\\mgtv"
	scan_list[2] = "%allusersprofile%\\application data\\mgtv"

	local all_drivers_list = {}
	all_drivers_list[1] = "mgtv.cache"
	all_drivers_list[2] = "Program Files\\mgtv"
	all_drivers_list[3] = "Program Files (x86)\\mgtv"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

	--搜狗拼音输入法卸载后残留
function f34773(id)
	local app_name = {} 
	app_name[1] = "SogouCloud.exe"
	app_name[2] = "SGTool.exe"
	app_name[3] = "SogouSvc.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Sogou Input",k="DisplayVersion"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Sogou Input",k="UninstallString"}
	reg_list[3] = {p="HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\services\\SogouSvc",k="ImagePath"}

	local scan_list = {}
	scan_list[1] = "%Allusersprofile%\\SogouInput"
	scan_list[2] = "%USERPROFILE%\\Appdata\\LocalLow\\SogouInput"
	scan_list[3] = "%USERPROFILE%\\Appdata\\LocalLow\\SogouPY.users"  
	scan_list[4] = "%systemroot%\\system32\\IME\\SogouPY"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\SogouInput"
	all_drivers_list[2] = "Program Files (x86)\\SogouInput"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

	--QQ浏览器卸载后残留
function f34775(id)
	local app_name = {} 
	app_name[1] = "QQBrowser.exe"
	app_name[2] = "TsService2.exe"
	app_name[3] = "QQBrowserFix.exe"
	app_name[4] = "QQBrowserLiveup.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\QQBrowser.exe",k="path"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\QQBrowser",k="DisplayIcon"}
	reg_list[3] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Tencent\\QQBrowser",k="exe"}

	local scan_list = {}
	scan_list[1] = "%APPDATA%\\Tencent\\QQBrowser"
	scan_list[2] = "%LOCALAPPDATA%\\Tencent\\QQBrowser"
	scan_list[3] = "%USERPROFILE%\\Pictures\\QQ浏览器截图"  
	
	local all_drivers_list = {}

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

	--网易云音乐卸载后残留
function f34777(id)
	local app_name = "cloudmusic.exe" 
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\网易云音乐",k="UninstallString"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Netease\\cloudmusic",k=""}

	local scan_list = {}
	scan_list[1] = "%userprofile%\\Local Settings\\Application Data\\Netease\\CloudMusic"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "CloudMusic"
	all_drivers_list[2] = "Program Files\\Netease\\CloudMusic"
	all_drivers_list[3] = "Program Files (x86)\\Netease\\CloudMusic"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

	--360驱动大师卸载后残留
function f34779(id)
	local app_name = "360DrvMgr.exe" 
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\360DrvMgr",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\360DrvMgr.exe",k=""}

	local scan_list = {}

	local all_drivers_list = {}
	all_drivers_list[1] = "360驱动大师目录"
	all_drivers_list[2] = "Program Files (x86)\\360\\360DrvMgr"
	all_drivers_list[3] = "Program Files\\360\\360DrvMgr"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

	--福昕阅读器卸载后残留
function f34782(id)
	local app_name = {} 
	app_name[1] = "FoxitReader.exe"
	app_name[2] = "FoxitUpdater.exe"
	app_name[3] = "FoxitProtect.exe"
	app_name[4] = "Fxfile.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Foxit Reader_is1",k="UninstallString"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\foxitreader.exe",k=""}
	reg_list[3] = {p="HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\services\\FxService",k="ImagePath"}
	
	local scan_list = {}
	scan_list[1] = "%appdata%\\Foxit Software\\Foxit Reader"
	scan_list[2] = "%appdata%\\Foxit Software\\Addon\\Foxit Reader"
	scan_list[3] = "%appdata%\\FoxitReaderPlus"
	scan_list[4] = "%allusersprofile%\\Foxit OnlineInstall"
	scan_list[5] = "%public%\\Foxit Software\\Foxit Reader"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\Foxit Software\\Foxit Reader"
	all_drivers_list[2] = "Program Files (x86)\\Foxit Software\\Foxit Reader"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

	--美图秀秀卸载后残留
function f34784(id)
	local app_name = "xiuxiu.exe" 
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\美图秀秀",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\Software\\Meitu\\xiuxiu",k=""}

	local scan_list = {}
	scan_list[1] = "%userprofile%\\Documents\\美图图库"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\meitu\\download"
	all_drivers_list[2] = "Program Files (x86)\\meitu\\sucai"
	all_drivers_list[3] = "Program Files\\meitu\\download"
	all_drivers_list[4] = "Program Files\\meitu\\sucai"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

	--百度下载助手卸载后残留
function f34785(id)
	local app_name = "bdrcdl.exe" 
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\BaiduRJDownloader",k="UninstallString"}

	local scan_list = {}
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\baidu\\BaiduRJDownloader"
	all_drivers_list[2] = "Program Files\\baidu\\BaiduRJDownloader"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

	--小鸟壁纸卸载后残留
function f34788(id)
	local app_name = {} 
	app_name[1] = "360wpapp.exe"
	app_name[2] = "360wpsrv.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\360wpapp",k="DisplayIcon"}
	
	local scan_list = {}
	scan_list[1] = "%appdata%\\360wp"
	scan_list[2] = "%appdata%\\360bizhi"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "360Downloads\\wpcache"

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

	--驱动人生卸载后残留
function f34789(id)
	local app_name = {} 
	app_name[1] = "DriveTheLife.exe"
	app_name[2] = "dtl_browser.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{0184EC1E-6DB6-4ef7-9B4E-0E82FB47CEF2}_is1",k="UninstallString"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\DTLSoft\\DriveTheLife",k="AppPath"}
	reg_list[3] = {p="HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run",k="DriveTheLife"}
	
	local scan_list = {}
	scan_list[1] = "%allusersprofile%\\dtltoolbox"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "DTLDownLoads"
	all_drivers_list[2] = "DTLFolder"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

	--360游戏大厅卸载后残留
function f34791(id)
	local app_name = {} 
	app_name[1] = "360GameTray.exe"
	app_name[2] = "360Game.exe"
	app_name[3] = "360GameServer.exe"
	app_name[4] = "360GameBox.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\360Game",k="UninstallString"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\360Game.exe",k=""}
	
	local scan_list = {}
	scan_list[1] = "%appdata%\\360Game"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "360用户文件\\游戏大厅"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --Notepad++卸载后残留
function f34793(id)
	local app_name = "notepad++.exe"

	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Notepad++",k="UninstallString"}
	
	local scan_list = {}
	scan_list[1] = "%localappdata%\\Notepad++"
	scan_list[2] = "%appdata%\\Notepad++"

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\Notepad++"
	all_drivers_list[2] = "Program Files\\Notepad++"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

	--万能看图王卸载后残留
function f34795(id)
	local app_name = {} 
	app_name[1] = "WnPicExplorer.exe"
	app_name[2] = "WnPicViewer.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\万能看图王",k="UninstallString"}
	
	local scan_list = {}
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\WnPicture"
	all_drivers_list[2] = "Program Files\\WnPicture"
	all_drivers_list[3] = "Program Files\\Common Files\\WnPicture"
	all_drivers_list[4] = "Program Files (x86)\\Common Files\\WnPicture"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

	--央视影音卸载后残留
function f34801(id)
	local app_name = {} 
	app_name[1] = "CBoxService.exe"
	app_name[2] = "CBox.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{07F79EE3-1012-40BF-BEE7-A07EE6C284DC}_is1",k="UninstallString"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run",k="CNTV-CBox"}
	reg_list[3] = {p="HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run",k="CBoxService"}
	
	local scan_list = {}
	
	local all_drivers_list = {}
	all_drivers_list[1] = "CNTV\\Download"
	all_drivers_list[2] = "Program Files (x86)\\CNTV\\CBox"
	all_drivers_list[3] = "Program Files\\CNTV\\CBox"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --极速看图卸载后残留
function f34803(id)
	local app_name = "fastpic.exe"

	local reg_list = {}
	reg_list[1] = {p="HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\极速看图",k="UninstallString"}
	
	local scan_list = {}
	scan_list[1] = "%allusersprofile%\\fastpic"
	scan_list[2] = "%appdata%\\fastpic"

	local all_drivers_list = {}

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --XY苹果助手卸载后残留
function f34805(id)
	local app_name = {}
	app_name[1] = "XYHelperSer32.exe"
	app_name[2] = "XYClient5.exe"
	app_name[3] = "XYLauncher5.exe"
	app_name[4] = "XYService5.exe"
	app_name[5] = "XYUpdate.exe"
			
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\XYClient5",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\XYClient5Url",k="URL Protocol"}
	
	local scan_list = {}
	scan_list[1] = "%appdata%\\XY\\XYClient5" 
	scan_list[2] = "%USERPROFILE%\\Documents\\XY"   
	
	local all_drivers_list = {}
	all_drivers_list[1] = "XY\\XYClient5"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --齐齐直播卸载后残留
function f34807(id)
	local app_name = "QXiuRoom.exe"
			
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\齐齐直播",k="UninstallString"}
	
	local scan_list = {}
	scan_list[1] = "%appdata%\\QXiu Files"
	
	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --Xmind卸载后残留
function f34809(id)
	local app_name = "XMind.exe"
			
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\XMind_is1",k="InstallLocation"}
	
	local scan_list = {}
	scan_list[1] = "%appdata%\\XMind"
	
	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --花椒直播卸载后残留
function f34811(id)
	local app_name = "Huajiao.exe"
			
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Huajiao",k="UninstallString"}
	
	local scan_list = {}
	scan_list[1] = "%APPDATA%\\HuaJiao"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\HuajiaoLive"
	all_drivers_list[2] = "Program Files\\HuajiaoLive"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --UU页游助手卸载后残留
function f34813(id)
	local app_name = "UUBrowser.exe"
			
	local reg_list = {}
	reg_list[1] = {p="HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\UU页游助手",k="UninstallString"}
	
	local scan_list = {}
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\UUBrowser"
	all_drivers_list[2] = "Program Files\\UUBrowser"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --遨游浏览器卸载后残留
function f34815(id)
	local app_name = {}
	app_name[1] = "MxService.exe"
	app_name[2] = "Maxthon.exe"
	app_name[3] = "MxCrashReport.exe"
	app_name[4] = "MxAppLoader.exe"
	app_name[5] = "MxStart.exe"
			
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Maxthon5",k="UninstallString"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\services\\MxService",k="ImagePath"}
	
	local scan_list = {}   
	scan_list[1] = "%appdata%\\Maxthon5"
	
	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --QQ影音卸载后残留
function f34817(id)
	local app_name = {}
	app_name[1] = "QQPlayer.exe"
	app_name[2] = "QPUp.exe"
			
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Tencent\\QQPlayer",k="ExePath"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\QQPlayer",k="DisplayIcon"}
	
	local scan_list = {}   
	
	local all_drivers_list = {}
	all_drivers_list[1] = "QQPlayerCache"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --JJ比赛卸载后残留
function f34819(id)
	local app_name = "TKCltNet.exe"
			
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\JJ 比赛  2016",k="UninstallString"}
	
	local scan_list = {}   
	scan_list[1] = "%appdata%\\JJMatch"
	scan_list[2] = "%localappdata%\\TKMC"
	
	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --刷机精灵卸载后残留
function f34821(id)
	local app_name = {}
	app_name[1] = "ShuameR.exe"
	app_name[2] = "shuame_helper.exe"
	app_name[3] = "ShuameDaemon.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Shuame",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\shuame.exe",k=""}
	reg_list[3] = {p="HKEY_CURRENT_USER\\Software\\BottleTech\\Shuame",k="ExeString"}
	
	local scan_list = {}   
	scan_list[1] = "%userprofile%\\Documents\\Shuame"
	
	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --海豚网游加速器卸载后残留
function f34823(id)
	local app_name = "DolphinQ.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\DolphinQ_is1",k="UninstallString"}
	
	local scan_list = {}   
	scan_list[1] = "%programfiles%\\XiangYou\\DolphinQ"
	scan_list[2] = "%programfiles(x86)%\\XiangYou\\DolphinQ"
	
	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --啊噗啊噗卸载后残留
function f34825(id)
	local app_name = {}
	app_name[1] = "UPUPOO.exe"
	app_name[2] = "Launch.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\upupoo",k="UninstallString"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\upupoo.exe",k=""}
	
	local scan_list = {}   
	scan_list[1] = "%userprofile%\\Documents\\upupoo"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "BiZhi\\AfterSome"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --熊猫直播卸载后残留
function f34827(id)
	local app_name = "PandaTv.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\PandaTV.exe",k="path"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PandaTV",k="DisplayIcon"}
	
	local scan_list = {}   
	scan_list[1] = "%appdata%\\PandaTV"
	
	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --EV录屏卸载后残留
function f34829(id)
	local app_name = "EVCapture.exe"
			
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\EVCapture",k="UninstallString"}
	
	local scan_list = {}
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\EVCapture"
	all_drivers_list[2] = "Program Files\\EVCapture"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --乐助手卸载后残留
function f34831(id)
	local app_name = {}
	app_name[1] = "MagicPlus.exe"
	app_name[2] = "MagicAdb.exe"
	app_name[3] = "MagicPlus_helper.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MagicPlus",k="UninstallString"}
	
	local scan_list = {}   
	scan_list[1] = "%appdata%\\lenovo\\MagicPlus"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "MagicPlus\\Download"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --37游戏盒子卸载后残留
function f34833(id)
	local app_name = {}
	app_name[1] = "Basicsurvey.exe"
	app_name[2] = "tabGame.exe"
	app_name[3] = "gamebox.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\37游戏盒子",k="UninstallString"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\AppPaths\\37游戏盒子",k=""}
	reg_list[3] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\sanqigamebox",k="URL Protocol"}
	
	local scan_list = {}   
	scan_list[1] = "%appdata%\\37游戏\\gamebox"
	scan_list[2] = "%appdata%\\37games\\gamebox"
	scan_list[3] = "%appdata%\\37games\\gamecache"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\37游戏盒子"
	all_drivers_list[2] = "Program Files (x86)\\37游戏盒子"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --斗鱼直播卸载后残留
function f34835(id)
	local app_name = {}
	app_name[1] = "dy_PCClient.exe"
	app_name[2] = "dyClientLancher.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\斗鱼PC客户端",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\dyClientLancher.exe",k="path"}
	
	local scan_list = {}   
	scan_list[1] = "%LOCALAPPDATA%\\dy_PCClient"
	
	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --微云同步盘卸载后残留
function f35284(id)
	local app_name = {}
	app_name[1] = "weiyun.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Weiyun",k="UninstallString"}
	
	local scan_list = {}   
	scan_list[1] = "%APPDATA%\\Tencent\\weiyun"
	scan_list[2] = "%userprofile%\\Documents\\Tencent Files\\All Users\\weiyun"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files\\Tencent\\weiyun"
	all_drivers_list[2] = "Program Files (x86)\\Tencent\\weiyun"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --2144浏览器卸载后残留
function f35285(id)
	local app_name = {}
	app_name[1] = "2144Browser.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_CURRENT_USER\\Software\\2144Browser",k="InstallerSuccessLaunchCmdLine"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\2144浏览器",k="UninstallString"}
	
	local scan_list = {}   
	scan_list[1] = "%LOCALAPPDATA%\\2144Browser"
	scan_list[2] = "%APPDATA%\\2144Browser"
	
	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --2345好压卸载后残留
function f35287(id)
	local app_name = {}
	app_name[1] = "HaoZip.exe"
	app_name[2] = "HaoZipC.exe"
	app_name[3] = "HHaoZipLoader.exe"
	app_name[4] = "HaoZipTool.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\HaoZip",k="UninstallString"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\HaoZip.exe",k="path"}
	
	local scan_list = {}   
	scan_list[1] = "%appdata%\\HaoZip"
	scan_list[2] = "%appdata%\\Helper_2345"
	scan_list[3] = "%LOCALAPPDATA%\\Temp\\HaoZip"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\2345soft\\HaoZip"
	all_drivers_list[2] = "Program Files\\2345soft\\HaoZip"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --IS语音卸载后残留
function f35295(id)
	local app_name = {}
	app_name[1] = "iSpeakService.exe"
	app_name[2] = "iSpeak.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\IS语音",k="UninstallString"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\iSpeakService",k="ImagePath"}
	
	local scan_list = {}   
	scan_list[1] = "%appdata%\\iSpeak"
	scan_list[2] = "%programdata%\\iSpeak"
	scan_list[3] = "%LOCALAPPDATA%\\iSpeak"
	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\iSpeak"
	all_drivers_list[2] = "program Files\\iSpeak"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --KBOX卸载后残留
function f35297(id)
	local app_name = {}
	app_name[1] = "KProtect.exe"
	app_name[2] = "91KBOX.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_CURRENT_USER\\Software\\91KBOX",k="MyPhotoPath"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\91KBOX",k="MainRun"}
	
	local scan_list = {}   
	scan_list[1] = "%programfiles%\\91KBOX\\Bin"
	scan_list[2] = "%programfiles(x86)%\\91KBOX\\Bin"
	scan_list[3] = "%programfiles%\\91KBOX\\Users\\DeFault\\EThumb"
	
	local all_drivers_list = {}

	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --KMPlayer卸载后残留
function f35299(id)
	local app_name = {}
	app_name[1] = "KMPlayer.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\The KMPlayer",k="UninstallString"}
	
	local scan_list = {}   
	scan_list[1] = "%USERPROFILE%\\Appdata\\LocalLow\\KMPlayer"

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\The KMPlayer"
	all_drivers_list[2] = "Program Files\\The KMPlayer"
	all_drivers_list[3] = "KMPlayer"	
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --PotPlayer卸载后残留
function f35301(id)
	local app_name = {}
	app_name[1] = "PotPlayerMini.exe"
	app_name[2] = "PotPlayerMini64.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PotPlayer",k="UninstallString"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PotPlayer64",k="UninstallString"}
	
	local scan_list = {}   
	scan_list[1] = "%APPDATA%\\PotPlayerMini"
	scan_list[2] = "%APPDATA%\\Daum\\PotPlayer"

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\DAUM\\PotPlayer"
	all_drivers_list[2] = "Program Files\\DAUM\\PotPlayer"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end
    --网易闪电邮卸载后残留
function f35325(id)
	local app_name = {}
	app_name[1] = "FlashMail.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\网易闪电邮",k="UninstallString"}
	
	local scan_list = {}   
	scan_list[1] = "%LocalAPPDATA%\\Netease\\FlashMail"

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\网易闪电邮"
	all_drivers_list[2] = "Program Files (x86)\\Netease\\网易闪电邮"
	all_drivers_list[3] = "Program Files\\网易闪电邮"
	all_drivers_list[4] = "Program Files\\Netease\\网易闪电邮"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --希沃授课助手卸载后残留
function f35329(id)
	local app_name = {}
	app_name[1] = "SeewoLink.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\SeewoLink",k=""}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Seewo\\SeewoLink",k="path"}
	
	local scan_list = {}   
	scan_list[1] = "%appdata%\\SeewoLink"

	local all_drivers_list = {}
	all_drivers_list[1] = "Seewo\\SeewoLinkService\\logs"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --PP助手卸载后残留
function f35303(id)
	local app_name = {}
	app_name[1] = "ihelper.exe"
	app_name[2] = "pphelper5.exe"
	app_name[3] = "adevicehelpermon.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PP助手5.0",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_CLASSES_ROOT\\CLSID\\{4AF7B58E-A0F8-4B67-BF9A-40AAAA98DC17}\\LocalServer32",k="ServerExecutable"}
	
	local scan_list = {}   
	scan_list[1] = "%appdata%\\Teiron\\pphelper5"
	scan_list[2] = "%userprofile%\\Documents\\teiron\\pphelper5"	

	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --WiFi共享精灵卸载后残留
function f35307(id)
	local app_name = {}
	app_name[1] = "Wi-Fi.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\WiFiShare",k="UninstallString"}
	
	local scan_list = {}   
	scan_list[1] = "%programfiles%\\WiFi"
	scan_list[2] = "%programfiles(x86)%\\WiFi"

	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --百度网盘卸载后残留
function f35311(id)
	local app_name = {}
	app_name[1] = "BaiduYunGuanjia.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\百度云管家",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Baidu\\BaiduYunGuanjia",k="installDir"}
	
	local scan_list = {}   
	scan_list[1] = "%appdata%\\BaiduYunKernel"
	scan_list[2] = "%appdata%\\Baidu\\BaiduYunGuanjia"
	scan_list[3] = "%appdata%\\BaiduYunGuanjia"	

	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

   --光影看图卸载后残留
function f35315(id)
	local app_name = {}
	app_name[1] = "NeoViewer.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\光影看图",k="UninstallString"}
	
	local scan_list = {}

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\Thunder Network\\NeoViewer"
	all_drivers_list[2] = "Program Files\\Thunder Network\\NeoViewer"	
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --火萤视频桌面卸载后残留
function f35317(id)
	local app_name = {}
	app_name[1] = "HYVideoDesktop.exe"
	app_name[2] = "HYWindow.exe"
	app_name[3] = "HY_RSDT.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\HuoYing",k="UninstallString"}
	
	local scan_list = {}   
	scan_list[1] = "%LOCALAPPDATA%\\HuoYing\\HYVideoDesktop"
	scan_list[2] = "%userprofile%\\Documents\\HYDD"	

	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --桔子浏览器卸载后残留
function f35319(id)
	local app_name = {}
	app_name[1] = "juzi.exe"
	app_name[2] = "hao123Juzi.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{B3111FE2-035F-460C-82B8-7660238F29D7}",k="DisplayIcon"}
	reg_list[2] = {p="HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\JuziBrowser.exe",k=""}
	
	local scan_list = {}   
	scan_list[1] = "%APPDATA%\\JuziBrowser"

	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --旗鱼浏览器卸载后残留
function f35321(id)
	local app_name = {}
	app_name[1] = "qiyu.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Qiyu",k="UninstallString"}
	
	local scan_list = {}   
	scan_list[1] = "%LOCALAPPDATA%\\ruanmei\\qiyu"
	scan_list[2] = "%Userprofile%\\Pictures\\旗鱼保存图片"	

	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\RuanMei\\Qiyu"
	all_drivers_list[2] = "Program Files\\RuanMei\\Qiyu"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --51模拟器卸载后残留
function f35291(id)
	local app_name = {}
	app_name[1] = "HEmulatorShell.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\51mnq",k="UninstallString"}
	
	local scan_list = {}
 	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\51mnq"
	all_drivers_list[2] = "Program Files\\51mnq"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --ABC看图卸载后残留
function f35293(id)
	local app_name = {}
	app_name[1] = "PhotoViewer.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PhotoViewer",k="UninstallString"}
	
	local scan_list = {}   
	scan_list[1] = "%userprofile%\\My Documents\\ABCPhoto"
	scan_list[2] = "%userprofile%\\Documents\\ABCPhoto"
	scan_list[3] = "%appdata%\\ABCPhoto"
	scan_list[4] = "%appdata%\\PhotoViewer"	
	
	local all_drivers_list = {}
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

    --360看图卸载后残留
function f35289(id)
	local app_name = {}
	app_name[1] = "360AblumViewer.exe"
	
	local reg_list = {}
	reg_list[1] = {p="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\360网络相册",k="UninstallString"}
	
	local scan_list = {}   
	scan_list[1] = "%APPDATA%\\360AblumUI"

	
	local all_drivers_list = {}
	all_drivers_list[1] = "Program Files (x86)\\360\\360Ablum"
	all_drivers_list[2] = "Program Files\\360\\360Ablum"
	
	CheckAppAndScan(id,app_name,reg_list,scan_list,all_drivers_list)
end

--UC浏览器旧版本残留
function f33667(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\UCBrowser'
	local reg_key = "InstallLocation"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\UCBrowser.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,0,append_version_path,0,0)
end


--搜狗高速浏览器旧版本残留
function f33481(id)	
	local reg_path = 'HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\SogouExplorer'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\SogouExplorer.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,2,append_version_path,2,0)
end

--金山词霸旧版本残留
function f33279(id)
	local reg_path = 'HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Power Word'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\PowerWord.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,2,append_version_path,3,0)
end

--猎豹浏览器旧版本残留
function f32660(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\liebao'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\liebao.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,2,append_version_path,2,0)
end


--360极速浏览器多版本残留
function f32911(id)
	local reg_path = 'HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\360Chrome'
	local reg_key = "InstallLocation"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\360Chrome.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,0,append_version_path,0,0)
end

--酷狗音乐多版本残留
function f32317(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\酷狗音乐'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\KuGou.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,1,0)
end


--Yandex浏览器多版本残留
function f31898(id)
	local reg_path = 'HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\YandexBrowser'
	local reg_key = "InstallLocation"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\browser.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,0,append_version_path,0,0)
end

--搜狗软件助手旧版本残留
function f32302(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\SogouSoftware'
	local reg_key = "InstallPath"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\SogouSoftware.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,0,append_version_path,0,0)
end

--快快游戏多版本残留
function f32193(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\快快游戏'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\gameboxrun.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,1,0)
end

--手心输入法多版本残留
function f31807(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PalmInput'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\PalmInputConfig.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,2,0)
end

--17173浏览器多版本残留
function f7854(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GamesBrowser'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\GamesBrowser.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,2,append_version_path,2,0)
end

--720浏览器多版本残留
function f7857(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\720浏览器'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\720_browser.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,3,append_version_path,3,0)
end

--QQ五笔多版本残留
function f32046(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\QQWubi'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\QQWBTrayBar.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,2,0)
end

--YY浏览器多版本残留
function f7863(id)
	local reg_path = 'HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\YYExplorer'
	local reg_key = "InstallLocation"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\YYExplorer.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,1,0)
end

function f7934(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\YYExplorer'
	local reg_key = "InstallLocation"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\YYExplorer.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,1,0)
end

--百度杀毒多版本残留
function f7866(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\百度杀毒'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\BaiduSdTray.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,2,0)
end

--百度输入法多版本残留
function f7869(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\BaiduPinyin'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\baidupinyin.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,2,0)
end

--百度卫士多版本残留
function f7872(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\百度卫士'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\BaiduAnTray.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,2,0)
end

--百度影音多版本残留
function f7875(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\BaiduPlayer'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\BaiduPlayer.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,2,0)
end

--桌面百度多版本残留 
function f32241(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\百度'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\baidu.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,2,0)
end

--百度影音浏览器多版残留 
function f7878(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\BaiduPlayer2'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[_]}{[0-9]+}$"
	local append_version_path = "\\baiduplayerbrowser.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,2,0)
end

--多玩YY多版本残留
function f7881(id)
	local reg_path = 'HKEY_CURRENT_USER\\Software\\duowan\\yy'
	local reg_key = {"RootPath","InstallDir",}	
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\YY.exe"
	GetMultiVersionDir(id,reg_path,reg_key[1],re_version,0,append_version_path,0,0)	
	GetMultiVersionDir(id,reg_path,reg_key[2],re_version,2,append_version_path,2,0)	
end

--多玩我的世界旧版本残留
function f32597(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\多玩我的世界盒子'
	local reg_key = "DisplayIcon"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\mcpcboxrun.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,1,0)		
end

--360安全浏览器多版本残留
function f32171(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\360se6.exe'
	local reg_key = "Path"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\360se.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,0,append_version_path,0,0)
end

--WPS Offfice多版本残留
function f33804(id)
	local reg_path ='HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Kingsoft Office'
	local reg_key ="LocationRoot"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path ="\\ksolaunch.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,1,0)
end

--如意淘多版本残留
function f7887(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ruyitao'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\ruyiUpdate.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,2,0)
end

--世界之窗多版本残留
function f7890(id)
	local reg_path = 'HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\TheWorld6'
	local reg_key = "InstallLocation"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\TheWorld.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,0,append_version_path,0,0)
end

--搜狗拼音多版本残留
function f7893(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Sogou Input'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\SGTool.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,2,0)
end

--搜狗五笔多版本残留
function f7896(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Sogou WBInput'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\QuickInput.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,2,0)
end

--淘宝浏览器多版本残留
function f7899(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\淘宝浏览器'
	local reg_key = "DisplayIcon"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\TaoBrowser.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,1,0)
end

--有道词典多版本残留
function f7905(id)
	local reg_path = {
	"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\有道词典",
	"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\有道词典",
	"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\网易有道词典",
	"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\网易有道词典",
	}
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\YodaoDict.exe"
	GetMultiVersionDir(id,reg_path[1],reg_key,re_version,1,append_version_path,1,0)
	GetMultiVersionDir(id,reg_path[2],reg_key,re_version,1,append_version_path,1,0)
  GetMultiVersionDir(id,reg_path[3],reg_key,re_version,1,append_version_path,1,0)
end

--云手机助手多版本残留
function f7908(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{06DEFCF8-5B3C-40ad-9EC1-68101D019D14}'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\zhushou.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,2,append_version_path,2,0)
end

--桌秀美化多版本残留
function f7911(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\桌秀美化软件'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\ZhuoXiu.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,2,0)
end

--PPTV视频多版本残留
function f7914(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PPLive'
	local reg_key = "UninstallString"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\PPLive.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,1,append_version_path,1,0)
end

--chrome多版本残留
function f30741(id)
	local reg_path = { 
	"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome",
	"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome",
	}	
	local reg_key =  "InstallLocation"
	
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\chrome.exe"
	GetMultiVersionDir(id,reg_path[1],reg_key,re_version,0,append_version_path,0,0)
	GetMultiVersionDir(id,reg_path[2],reg_key,re_version,0,append_version_path,0,0)
end

--Opera浏览器多版本残留
function f30738(id)
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\opera.exe'
	local reg_key = "Path"
	local re_version = "^{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}{[.]}{[0-9]+}$"
	local append_version_path = "\\launcher.exe"
	GetMultiVersionDir(id,reg_path,reg_key,re_version,0,append_version_path,0,0)
	if osApi.ExistKey(reg_path, false) == true then
		return
	end
	local reg_path1 = ''
	local KeyPaths={
		'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
		'HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall'
		}
	local Opera="Opera"
	local retcode
	local subkey
	
	for _,KeyPath in pairs(KeyPaths) do
		retcode,subkey = osApi.EnumKey(KeyPath,false)
		if retcode == 0 and #subkey ~= 0 then
			for k,v in ipairs(subkey) do	
				if Opera == string.sub(v,1,5) then
					reg_path1 = KeyPath..'\\'..v	
					break
				end	
			end
		end
	end
	reg_key1 = "UninstallString"
	GetMultiVersionDir(id,reg_path1,reg_key1,re_version,1,append_version_path,1,0)
end

--英雄联盟LCU更新包
function f33014(id)
	local gameID = 1
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Tencent\\LOL_LCU'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = '_V'		-- 版本号前面的识别子串
	local re_end = '_'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,true)
end

--英雄联盟更新包
function f70000(id)
	local gameID = 1
	local reg_path = 'HKEY_CURRENT_USER\\SOFTWARE\\Tencent\\LOL'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = '_V'		-- 版本号前面的识别子串
	local re_end = '_'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,true)
end

--CF更新包
function f70001(id)
	local gameID = 5
	local reg_path = 'HKEY_CURRENT_USER\\Software\\Tencent\\CrossFire'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = '-'		-- 版本号前面的识别子串
	local re_end = '_'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,true)
end

--tgame更新包
function f70002(id)
	local gameID = 17
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Tencent\\tgame'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = '_'		-- 版本号前面的识别子串
	local re_end = '_'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,false)
end

--tps更新包
function f70003(id)
	local gameID = 52
	local reg_path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Tencent\\TPS'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = '_'		-- 版本号前面的识别子串
	local re_end = '_'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,false)
end

--BNS更新包
function f70004(id)
	local gameID = 46
	local reg_path = 'HKEY_CURRENT_USER\\Software\\Tencent\\BNS'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = '_'		-- 版本号前面的识别子串
	local re_end = '_'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,true)
end

--DNF更新包
function f70005(id)
	local gameID = 6
	local reg_path = 'HKEY_CURRENT_USER\\Software\\Tencent\\DNF'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = '_'		-- 版本号前面的识别子串
	local re_end = '.tcls'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,false)
end

--dancer更新包
function f70006(id)
	local gameID = 25
	local reg_path = 'HKEY_CURRENT_USER\\Software\\Tencent\\X5'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = '_'		-- 版本号前面的识别子串
	local re_end = 'N_;_;.exe'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,false)
end

--xgame更新包
function f70007(id)
	local gameID = 8
	local reg_path = 'HKEY_CURRENT_USER\\SOFTWARE\\Tencent\\YLZTGAME'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = '-'		-- 版本号前面的识别子串
	local re_end = '.exe'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,false)
end

--codol更新包
function f70008(id)
	local gameID = 43
	local reg_path = 'HKEY_CURRENT_USER\\SOFTWARE\\Tencent\\CODOL'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = '_'		-- 版本号前面的识别子串
	local re_end = '_'			-- 版本号后面的识别子串
	local rp_begin = 3 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,false)
end

--fifaol3更新包
function f70009(id)
	local gameID = 77
	local reg_path = 'HKEY_CURRENT_USER\\SOFTWARE\\Tencent\\FIFAOl3'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = '_'		-- 版本号前面的识别子串
	local re_end = '_'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,false)
end

--wuxia更新包
function f70011(id)
	local gameID = 88
	local reg_path = 'HKEY_CURRENT_USER\\SOFTWARE\\Tencent\\天涯明月刀'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = 'to_'		-- 版本号前面的识别子串
	local re_end = '_'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,false)
end

--apple更新包
function f70013(id)
	local gameID = 95
	local reg_path = 'HKEY_CURRENT_USER\\SOFTWARE\\Tencent\\apple'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = '_'		-- 版本号前面的识别子串
	local re_end = '_'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,false)
end

--h2更新包
function f70014(id)
	local gameID = 11
	local reg_path = 'HKEY_CURRENT_USER\\SOFTWARE\\Tencent\\QQ仙灵'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = 'to_'		-- 版本号前面的识别子串
	local re_end = '_'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,false)
end

--qqxxz更新包
function f70015(id)
	local gameID = 27
	local reg_path = 'HKEY_CURRENT_USER\\SOFTWARE\\Tencent\\QQXXZ'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = 'to_'		-- 版本号前面的识别子串
	local re_end = '_'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,false)
end

--xunxian更新包
function f70016(id)
	local gameID = 28
	local reg_path = 'HKEY_CURRENT_USER\\SOFTWARE\\Tencent\\xx'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = '-'		-- 版本号前面的识别子串
	local re_end = '.exe'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,false)
end

--ava更新包
function f70017(id)
	local gameID = 39
	local reg_path = 'HKEY_CURRENT_USER\\SOFTWARE\\Tencent\\A.V.A'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = '-'		-- 版本号前面的识别子串
	local re_end = '_'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,true)
end

--wgame更新包
function f70018(id)
	local gameID = 22
	local reg_path = 'HKEY_CURRENT_USER\\SOFTWARE\\Tencent\\dzs'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = '_'		-- 版本号前面的识别子串
	local re_end = '_'			-- 版本号后面的识别子串
	local rp_begin = 2 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,false)
end

--xuanyuan更新包
function f70019(id)
	local gameID = 13
	local reg_path = 'HKEY_CURRENT_USER\\SOFTWARE\\Tencent\\XY'
	local reg_key = 'InstallPath'
	local bSpecial = true		-- 是否为特殊TCLS
	local re_begin = 'V'		-- 版本号前面的识别子串
	local re_end = 'Patch'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,false)
end

--nba2k更新包
function f70020(id)
	local gameID = 9
	local reg_path = 'HKEY_CURRENT_USER\\SOFTWARE\\Tencent\\NBA2KOnline'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = '_'		-- 版本号前面的识别子串
	local re_end = '.exe'			-- 版本号后面的识别子串
	local rp_begin = 2 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,false)
end

--archeage更新包
function f70022(id)
	local gameID = 91
	local reg_path = 'HKEY_CURRENT_USER\\SOFTWARE\\Tencent\\ArcheAge'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = '-'		-- 版本号前面的识别子串
	local re_end = '.exe'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,false)
end

--变形金刚更新包
function f33913(id)
	local gameID = 233
	local reg_path = 'HKEY_CURRENT_USER\\SOFTWARE\\Tencent\\TFOL'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = 'P_'		-- 版本号前面的识别子串
	local re_end = '_'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,false)
end

--极品飞车OL更新包
function f33915(id)
	local gameID = 193
	local reg_path = 'HKEY_CURRENT_USER\\SOFTWARE\\Tencent\\NFSOL'
	local reg_key = 'InstallPath'
	local bSpecial = false		-- 是否为特殊TCLS
	local re_begin = 'L_'		-- 版本号前面的识别子串
	local re_end = '_'			-- 版本号后面的识别子串
	local rp_begin = 1 			-- 前面的子串第几次出现
	CheckGameUpdatePatchs(id,gameID,reg_path,reg_key,bSpecial,re_begin,re_end,rp_begin,false)
end


--卸载残留  
gt['f33991'] = f33991
gt['f33989'] = f33989
gt['f33987'] = f33987
gt['f33967'] = f33967
gt['f33922'] = f33922
gt['f33854'] = f33854
gt['f33849'] = f33849
gt['f33847'] = f33847
gt['f33845'] = f33845
gt['f33831'] = f33831
gt['f33775'] = f33775
gt['f33737'] = f33737
gt['f33730'] = f33730
gt['f33725'] = f33725
gt['f33714'] = f33714
gt['f33708'] = f33708
gt['f33690'] = f33690
gt['f33675'] = f33675
gt['f33673'] = f33673
gt['f33611'] = f33611
gt['f33305'] = f33305
gt['f33284'] = f33284
gt['f33253'] = f33253
gt['f33201'] = f33201
gt['f33179'] = f33179
gt['f33146'] = f33146
gt['f33110'] = f33110
gt['f33107'] = f33107
gt['f32801'] = f32801
gt['f32604'] = f32604
gt['f32312'] = f32312
gt['f32167'] = f32167
gt['f7800'] = f7800
gt['f7802'] = f7802
gt['f7804'] = f7804
gt['f7806'] = f7806
gt['f7808'] = f7808
gt['f7810'] = f7810
gt['f7812'] = f7812
gt['f7814'] = f7814
gt['f7816'] = f7816
gt['f7818'] = f7818
gt['f7820'] = f7820
gt['f7822'] = f7822
gt['f7824'] = f7824
gt['f7826'] = f7826
gt['f7828'] = f7828
gt['f7830'] = f7830
gt['f7832'] = f7832
gt['f7834'] = f7834
gt['f7836'] = f7836
gt['f7838'] = f7838
gt['f7840'] = f7840
gt['f7842'] = f7842
gt['f7844'] = f7844
gt['f7846'] = f7846
gt['f7848'] = f7848
gt['f7850'] = f7850
gt['f50001'] = f50001
gt['f50003'] = f50003
gt['f50005'] = f50005
gt['f50007'] = f50007
gt['f50009'] = f50009
gt['f50011'] = f50011
gt['f50013'] = f50013
gt['f50015'] = f50015
gt['f50017'] = f50017
gt['f50019'] = f50019
gt['f50021'] = f50021
gt['f50023'] = f50023
gt['f50025'] = f50025
gt['f50027'] = f50027
gt['f50028'] = f50028
gt['f34115'] = f34115
gt['f34122'] = f34122
gt['f34773'] = f34773 
gt['f34775'] = f34775
gt['f34777'] = f34777
gt['f34779'] = f34779
gt['f34782'] = f34782
gt['f34784'] = f34784
gt['f34785'] = f34785
gt['f34788'] = f34788
gt['f34789'] = f34789
gt['f34791'] = f34791
gt['f34793'] = f34793
gt['f34795'] = f34795
gt['f34801'] = f34801
gt['f34803'] = f34803
gt['f34805'] = f34805
gt['f34807'] = f34807
gt['f34809'] = f34809
gt['f34811'] = f34811
gt['f34813'] = f34813
gt['f34815'] = f34815
gt['f34817'] = f34817
gt['f34819'] = f34819
gt['f34821'] = f34821
gt['f34823'] = f34823
gt['f34825'] = f34825
gt['f34827'] = f34827
gt['f34829'] = f34829
gt['f34831'] = f34831
gt['f34833'] = f34833
gt['f34835'] = f34835
gt['f35284'] = f35284
gt['f35285'] = f35285
gt['f35287'] = f35287
gt['f35289'] = f35289
gt['f35291'] = f35291
gt['f35293'] = f35293
gt['f35295'] = f35295
gt['f35297'] = f35297
gt['f35299'] = f35299
gt['f35301'] = f35301
gt['f35303'] = f35303
gt['f35307'] = f35307
gt['f35309'] = f35309
gt['f35311'] = f35311
gt['f35315'] = f35315
gt['f35317'] = f35317
gt['f35319'] = f35319
gt['f35321'] = f35321
gt['f35325'] = f35325
gt['f35329'] = f35329

--多版本残留
gt['f33667'] = f33667
gt['f33481'] = f33481
gt['f33279'] = f33279
gt['f32911'] = f32911
gt['f32660'] = f32660
gt['f32597'] = f32597
gt['f32317'] = f32317
gt['f32302'] = f32302
gt['f32241'] = f32241
gt['f32193'] = f32193
gt['f32171'] = f32171
gt['f31898'] = f31898
gt['f31807'] = f31807
gt['f7854'] = f7854
gt['f7857'] = f7857
gt['f32046'] = f32046
gt['f7863'] = f7863
gt['f7866'] = f7866
gt['f7869'] = f7869
gt['f7872'] = f7872
gt['f7875'] = f7875
gt['f7878'] = f7878
gt['f7881'] = f7881
gt['f33804'] = f33804
gt['f7887'] = f7887
gt['f7890'] = f7890
gt['f7893'] = f7893
gt['f7896'] = f7896
gt['f7899'] = f7899
gt['f7905'] = f7905
gt['f7908'] = f7908
gt['f7911'] = f7911
gt['f7914'] = f7914
gt['f7934'] = f7934
gt['f30741'] = f30741
gt['f30738'] = f30738

--游戏补丁
gt['f33915'] = f33915 --极品飞车 
gt['f33913'] = f33913  --变形金刚
gt['f33014'] = f33014  --70023  英雄联盟
gt['f70000'] = f70000  --70023  英雄联盟
gt['f70001'] = f70001  --70024  穿越火线
gt['f70002'] = f70002  --70025  逆战
gt['f70003'] = f70003  --70026  枪神纪
gt['f70004'] = f70004  --70027  剑灵
gt['f70005'] = f70005  --70028  地下城与勇士
gt['f70006'] = f70006  --70029  QQ炫舞
gt['f70007'] = f70007  --70030  御龙在天
gt['f70008'] = f70008  --70031  使命召唤
gt['f70009'] = f70009  --70032  FIFA
gt['f70011'] = f70011  --70010  天涯明月刀
gt['f70013'] = f70013  --70012  疾风之刃
gt['f70014'] = f70014  --70033  QQ仙灵
gt['f70015'] = f70015  --70034  QQ仙侠传
gt['f70016'] = f70016  --70035  新寻仙
gt['f70017'] = f70017  --70036  战地之王
gt['f70018'] = f70018  --70037  斗战神
gt['f70019'] = f70019  --70038  轩辕传奇
gt['f70020'] = f70020  --70039  NBA2K
gt['f70022'] = f70022  --70021  上古世纪

gt['GetAllDrivers'] = GetAllDrivers

function main(argc,argv)
	--osApi.Print("GarbageCleaner.txt", false, "Start Scan lua:11112222333344445555666677778888")

	if argc ~= 0 and #argv ~= 0 then
		--osApi.Print("GarbageCleaner.txt", false, "Func:" .. argv[1])
		func_name = argv[1]
		exec_func_name = func_name
		if string.find(func_name,"PreScan_") == 1 then
			exec_func_name = string.sub(func_name,9)
		end
		func = gt[exec_func_name]
		if func~=nil then
			func(func_name)
		end
	end

end

